Movatterモバイル変換


[0]ホーム

URL:


Skip to content
DEV Community
Log in Create account

DEV Community

Allan MacGregor 🇨🇦
Allan MacGregor 🇨🇦

Posted on

     

Vim Is The Perfect IDE

This article was originally published inHackerNoon

Over the years I've jumped back and forth between many code editors,IDEs andtools; but it seems that somehow I always end up coming right back to VIM, and not only for programming – guess which markdown editor I'm using to write this post.

I've have tried Atom, SublimeText, TextMate, Eclipse, Visual Studio, and most of the Jetbrains products, I'm constantlytweaking and looking for a better setup, however Vim always feels like home to me; and I'm to the point now where I rarely use IDEs – exception being messy and complex projects where IDEs can do a lot of heavily lifting (yes, Magento I'm talking about you.)

But other than that Vim is my default Ruby, Elixir, Python, PHP IDE and as well the main tool that I use for writing drafts and books.

What it look like

The Setup

So how does this magical tool work? Is all out of the box right? right? Well no, as with all the worthwhile things in life there is a bit of effort involved on getting the Vim setup just like I wanted it. Fortunately, is far from custom and is mostly the right combination of plugins.

You can find my current Vim configuration and dot files in its correspondingGithub repository feel free to fork it and give a shot.

We are in particular interested in the vimrc file, let's break it down:

"""""""""""""""""""""""""""""""""""""" Allan MacGregor Vimrc configuration """""""""""""""""""""""""""""""""""""set nocompatiblesyntax onset nowrapset encoding=utf8"""" START Vundle Configuration " Disable file type for vundlefiletype off                  " required" set the runtime path to include Vundle and initializeset rtp+=~/.vim/bundle/Vundle.vimcall vundle#begin()" let Vundle manage Vundle, requiredPlugin 'gmarik/Vundle.vim'" UtilityPlugin 'scrooloose/nerdtree'Plugin 'majutsushi/tagbar'Plugin 'ervandew/supertab'Plugin 'BufOnly.vim'Plugin 'wesQ3/vim-windowswap'Plugin 'SirVer/ultisnips'Plugin 'junegunn/fzf.vim'Plugin 'junegunn/fzf'Plugin 'godlygeek/tabular'Plugin 'ctrlpvim/ctrlp.vim'Plugin 'benmills/vimux'Plugin 'jeetsukumaran/vim-buffergator'Plugin 'gilsondev/searchtasks.vim'Plugin 'Shougo/neocomplete.vim'Plugin 'tpope/vim-dispatch'" Generic Programming Support Plugin 'jakedouglas/exuberant-ctags'Plugin 'honza/vim-snippets'Plugin 'Townk/vim-autoclose'Plugin 'tomtom/tcomment_vim'Plugin 'tobyS/vmustache'Plugin 'janko-m/vim-test'Plugin 'maksimr/vim-jsbeautify'Plugin 'vim-syntastic/syntastic'Plugin 'neomake/neomake'" Markdown / WrittingPlugin 'reedes/vim-pencil'Plugin 'tpope/vim-markdown'Plugin 'jtratner/vim-flavored-markdown'Plugin 'LanguageTool'" Git SupportPlugin 'kablamo/vim-git-log'Plugin 'gregsexton/gitv'Plugin 'tpope/vim-fugitive'"Plugin 'jaxbot/github-issues.vim'" PHP SupportPlugin 'phpvim/phpcd.vim'Plugin 'tobyS/pdv'" Erlang SupportPlugin 'vim-erlang/vim-erlang-tags'Plugin 'vim-erlang/vim-erlang-runtime'Plugin 'vim-erlang/vim-erlang-omnicomplete'Plugin 'vim-erlang/vim-erlang-compiler'" Elixir Support Plugin 'elixir-lang/vim-elixir'Plugin 'avdgaag/vim-phoenix'Plugin 'mmorearty/elixir-ctags'Plugin 'mattreduce/vim-mix'Plugin 'BjRo/vim-extest'Plugin 'frost/vim-eh-docs'Plugin 'slashmili/alchemist.vim'Plugin 'tpope/vim-endwise'Plugin 'jadercorrea/elixir_generator.vim'" Elm SupportPlugin 'lambdatoast/elm.vim'" Theme / InterfacePlugin 'AnsiEsc.vim'Plugin 'ryanoasis/vim-devicons'Plugin 'vim-airline/vim-airline'Plugin 'vim-airline/vim-airline-themes'Plugin 'sjl/badwolf'Plugin 'tomasr/molokai'Plugin 'morhetz/gruvbox'Plugin 'zenorocha/dracula-theme', {'rtp': 'vim/'}Plugin 'junegunn/limelight.vim'Plugin 'mkarmona/colorsbox'Plugin 'romainl/Apprentice'Plugin 'Lokaltog/vim-distinguished'Plugin 'chriskempson/base16-vim'Plugin 'w0ng/vim-hybrid'Plugin 'AlessandroYorba/Sierra'Plugin 'daylerees/colour-schemes'Plugin 'effkay/argonaut.vim'Plugin 'ajh17/Spacegray.vim'Plugin 'atelierbram/Base2Tone-vim'Plugin 'colepeters/spacemacs-theme.vim'" OSX stupid backspace fixset backspace=indent,eol,startcall vundle#end()            " requiredfiletype plugin indent on    " required"""" END Vundle Configuration """""""""""""""""""""""""""""""""""""" Configuration Section"""""""""""""""""""""""""""""""""""""" Show linenumbersset numberset ruler" Set Proper Tabsset tabstop=4set shiftwidth=4set smarttabset expandtab" Always display the status lineset laststatus=2" Enable Elite mode, No ARRRROWWS!!!!let g:elite_mode=1" Enable highlighting of the current lineset cursorline" Theme and Styling set t_Co=256set background=darkif (has("termguicolors"))  set termguicolorsendiflet base16colorspace=256  " Access colors present in 256 colorspacecolorscheme spacegray" colorscheme spacemacs-themelet g:spacegray_underline_search = 1let g:spacegray_italicize_comments = 1" Vim-Airline Configurationlet g:airline#extensions#tabline#enabled = 1let g:airline_powerline_fonts = 1 let g:airline_theme='hybrid'let g:hybrid_custom_term_colors = 1let g:hybrid_reduced_contrast = 1 " Syntastic Configurationset statusline+=%#warningmsg#set statusline+=%{SyntasticStatuslineFlag()}set statusline+=%*let g:syntastic_always_populate_loc_list = 1let g:syntastic_auto_loc_list = 1let g:syntastic_check_on_open = 1" let g:syntastic_check_on_wq = 0" let g:syntastic_enable_elixir_checker = 1" let g:syntastic_elixir_checkers = ["elixir"]" Neomake settingsautocmd! BufWritePost * Neomakelet g:neomake_elixir_enabled_makers = ['mix', 'credo', 'dogma']" Vim-PDV Configuration let g:pdv_template_dir = $HOME ."/.vim/bundle/pdv/templates_snip"" Markdown Syntax Supportaugroup markdown    au!    au BufNewFile,BufRead *.md,*.markdown setlocal filetype=ghmarkdownaugroup END" Github Issues Configurationlet g:github_access_token = "e6fb845bd306a3ca7f086cef82732d1d5d9ac8e0"" Vim-Alchemist Configurationlet g:alchemist#elixir_erlang_src = "/Users/amacgregor/Projects/Github/alchemist-source"let g:alchemist_tag_disable = 1" Vim-Supertab Configurationlet g:SuperTabDefaultCompletionType = "<C-X><C-O>"" Settings for Writtinglet g:pencil#wrapModeDefault = 'soft'   " default is 'hard'let g:languagetool_jar  = '/opt/languagetool/languagetool-commandline.jar'" Vim-pencil Configurationaugroup pencil  autocmd!  autocmd FileType markdown,mkd call pencil#init()  autocmd FileType text         call pencil#init()augroup END" Vim-UtilSnips Configuration" Trigger configuration. Do not use <tab> if you use https://github.com/Valloric/YouCompleteMe.let g:UltiSnipsExpandTrigger="<tab>"let g:UltiSnipsJumpForwardTrigger="<c-b>"let g:UltiSnipsJumpBackwardTrigger="<c-z>"let g:UltiSnipsEditSplit="vertical" " If you want :UltiSnipsEdit to split your window." Vim-Test Configurationlet test#strategy = "vimux"" Neocomplete Settingslet g:acp_enableAtStartup = 0let g:neocomplete#enable_at_startup = 1let g:neocomplete#enable_smart_case = 1let g:neocomplete#sources#syntax#min_keyword_length = 3" Define dictionary.let g:neocomplete#sources#dictionary#dictionaries = {    \ 'default' : '',    \ 'vimshell' : $HOME.'/.vimshell_hist',    \ 'scheme' : $HOME.'/.gosh_completions'        \ }" Define keyword.if !exists('g:neocomplete#keyword_patterns')    let g:neocomplete#keyword_patterns = {}endiflet g:neocomplete#keyword_patterns['default'] = '\h\w*'function! s:my_cr_function()  return (pumvisible() ? "\<C-y>" : "" ) . "\<CR>"  " For no inserting <CR> key.  "return pumvisible() ? "\<C-y>" : "\<CR>"endfunction" Close popup by <Space>."inoremap <expr><Space> pumvisible() ? "\<C-y>" : "\<Space>"" AutoComplPop like behavior."let g:neocomplete#enable_auto_select = 1" Enable omni completion.autocmd FileType css setlocal omnifunc=csscomplete#CompleteCSSautocmd FileType html,markdown setlocal omnifunc=htmlcomplete#CompleteTagsautocmd FileType javascript setlocal omnifunc=javascriptcomplete#CompleteJSautocmd FileType python setlocal omnifunc=pythoncomplete#Completeautocmd FileType xml setlocal omnifunc=xmlcomplete#CompleteTags" Enable heavy omni completion.if !exists('g:neocomplete#sources#omni#input_patterns')  let g:neocomplete#sources#omni#input_patterns = {}endif"let g:neocomplete#sources#omni#input_patterns.php = '[^. \t]->\h\w*\|\h\w*::'"let g:neocomplete#sources#omni#input_patterns.c = '[^.[:digit:] *\t]\%(\.\|->\)'"let g:neocomplete#sources#omni#input_patterns.cpp = '[^.[:digit:] *\t]\%(\.\|->\)\|\h\w*::'" For perlomni.vim setting." https://github.com/c9s/perlomni.vimlet g:neocomplete#sources#omni#input_patterns.perl = '\h\w*->\h\w*\|\h\w*::'" Elixir Tagbar Configurationlet g:tagbar_type_elixir = {    \ 'ctagstype' : 'elixir',    \ 'kinds' : [        \ 'f:functions',        \ 'functions:functions',        \ 'c:callbacks',        \ 'd:delegates',        \ 'e:exceptions',        \ 'i:implementations',        \ 'a:macros',        \ 'o:operators',        \ 'm:modules',        \ 'p:protocols',        \ 'r:records',        \ 't:tests'    \ ]    \ }" Fzf Configuration" This is the default extra key bindingslet g:fzf_action = {  \ 'ctrl-t': 'tab split',  \ 'ctrl-x': 'split',  \ 'ctrl-v': 'vsplit' }" Default fzf layout" - down / up / left / rightlet g:fzf_layout = { 'down': '~40%' }" In Neovim, you can set up fzf window using a Vim commandlet g:fzf_layout = { 'window': 'enew' }let g:fzf_layout = { 'window': '-tabnew' }" Customize fzf colors to match your color schemelet g:fzf_colors =\ { 'fg':      ['fg', 'Normal'],  \ 'bg':      ['bg', 'Normal'],  \ 'hl':      ['fg', 'Comment'],  \ 'fg+':     ['fg', 'CursorLine', 'CursorColumn', 'Normal'],  \ 'bg+':     ['bg', 'CursorLine', 'CursorColumn'],  \ 'hl+':     ['fg', 'Statement'],  \ 'info':    ['fg', 'PreProc'],  \ 'prompt':  ['fg', 'Conditional'],  \ 'pointer': ['fg', 'Exception'],  \ 'marker':  ['fg', 'Keyword'],  \ 'spinner': ['fg', 'Label'],  \ 'header':  ['fg', 'Comment'] }" Enable per-command history." CTRL-N and CTRL-P will be automatically bound to next-history and" previous-history instead of down and up. If you don't like the change," explicitly bind the keys to down and up in your $FZF_DEFAULT_OPTS.let g:fzf_history_dir = '~/.local/share/fzf-history'"""""""""""""""""""""""""""""""""""""" Mappings configurationn"""""""""""""""""""""""""""""""""""""map <C-n> :NERDTreeToggle<CR>map <C-m> :TagbarToggle<CR>" Omnicomplete Better Navinoremap <expr> <c-j> ("\<C-n>")inoremap <expr> <c-k> ("\<C-p>")" Neocomplete Plugin mappinsinoremap <expr><C-g>     neocomplete#undo_completion()inoremap <expr><C-l>     neocomplete#complete_common_string()" Recommended key-mappings." <CR>: close popup and save indent.inoremap <silent> <CR> <C-r>=<SID>my_cr_function()<CR>" <TAB>: completion.inoremap <expr><TAB>  pumvisible() ? "\<C-n>" : "\<TAB>"" <C-h>, <BS>: close popup and delete backword char.inoremap <expr><C-h> neocomplete#smart_close_popup()."\<C-h>"inoremap <expr><BS> neocomplete#smart_close_popup()."\<C-h>"" Mapping selecting Mappingsnmap <leader><tab> <plug>(fzf-maps-n)xmap <leader><tab> <plug>(fzf-maps-x)omap <leader><tab> <plug>(fzf-maps-o)" Shortcutsnnoremap <Leader>o :Files<CR> nnoremap <Leader>O :CtrlP<CR>nnoremap <Leader>w :w<CR>" Insert mode completionimap <c-x><c-k> <plug>(fzf-complete-word)imap <c-x><c-f> <plug>(fzf-complete-path)imap <c-x><c-j> <plug>(fzf-complete-file-ag)imap <c-x><c-l> <plug>(fzf-complete-line)" Vim-Test Mappingsnmap <silent> <leader>t :TestNearest<CR>nmap <silent> <leader>T :TestFile<CR>nmap <silent> <leader>a :TestSuite<CR>nmap <silent> <leader>l :TestLast<CR>nmap <silent> <leader>g :TestVisit<CR>" Vim-PDV Mappingsautocmd FileType php inoremap <C-p> <ESC>:call pdv#DocumentWithSnip()<CR>iautocmd FileType php nnoremap <C-p> :call pdv#DocumentWithSnip()<CR>autocmd FileType php setlocal omnifunc=phpcd#CompletePHP" Disable arrow movement, resize splits instead.if get(g:, 'elite_mode')    nnoremap <Up>    :resize +2<CR>    nnoremap <Down>  :resize -2<CR>    nnoremap <Left>  :vertical resize +2<CR>    nnoremap <Right> :vertical resize -2<CR>endifmap <silent> <LocalLeader>ws :highlight clear ExtraWhitespace<CR>" Advanced customization using autoload functionsinoremap <expr> <c-x><c-k> fzf#vim#complete#word({'left': '15%'})" Vim-Alchemist Mappingsautocmd FileType elixir nnoremap <buffer> <leader>h :call alchemist#exdoc()<CR>autocmd FileType elixir nnoremap <buffer> <leader>d :call alchemist#exdef()<CR>
Enter fullscreen modeExit fullscreen mode

Each plugin in this setup is separated in the following categories:

Utility

This kind of a miscellaneous category and is comprised of plugins used to enhance or change the behaivour of core vim; the most useful important ones are:

  • Nerdtree: It gives you easy access to the file system in the form of a directory tree on the left side of the screen, as well provides shortcuts for filesystem manipulation(create, delete, move files and directories)
  • Tagbar: Quick tag browser for the current file, a must have if you are using any kind ofctags like exuberant-tags.
  • FZF: Fuzzy finder, another handy utility for finding files and commands.
  • Neocomplete: Vim Autocomplete on steroids.

Generic Programming Support

These plugins fall directly on the category of programming and are used my all or most of theprogramming languages that I currently have setup:

  • Exuberant-Ctags: tags are named definitions of classes, functions, abstract types and so on; adding support to Vim gives you some of that 'magic' IDE code navigation functionality.
  • Syntastic: THE syntax checking plugin for Vim, if you are familiar with the way that code inspections work on Jetbrains and similar IDEs, syntastic will make feel right at home.
  • Vim-autoclose: Automatically closes a character that could/should have a matching closing counterpart, like () "" [] {} and so on.

Markdown/Writing

As I mentioned Vim is my go to editor for drafting new posts be it books, blogs or random angry letters. From this particular section only language tools deservers a special shot-out as it makes for a great Grammar checker directly from inside Vim.

Erlang/Elixir/PHP/Elm Support

When it comes down to theindividual language support there isn't really much to highlight other than I've tried (and somewhat failed) to keep the plugins to a minimum and focus only on theessential language support.

So far elixir is winning the battle in terms of plugins as I've added additional functionality like the ability to run tests and generate content from inside Vim, I have yet to decide if I'm keeping all the plugins for it.

Git Support

Standard git support that I'm afraid I rarely use, I find myself going directly back to theshell and doing thegit workflow outside of Vim, so I'm open to suggestions and to hear what everyone else is using in terms of setup.

Themes and Interfaces

Ok this is a big one but mostly because I keep forgetting to remove unused themes and colorschemes, let's highlight the important ones:

  • Vimarline: Lean and mean status/tabline for Vim; it also looks cool as fuck.
  • Vim-Devicons: Because not only atom gets all the fancy icons on the sidebar, highly recommended to if you are using nerdtree.

The remaining parts of the configuration file are either plugin configuration or personal key re-mappings that I use for quality of like; I've done my best to document and segment each section so it should be easy enough to understand what each setting is doing.

For anyone getting starting with Vim, I do want to bring special attention to the following:

" Disable arrow movement, resize splits instead.if get(g:, 'elite_mode')    nnoremap <Up>    :resize +2<CR>    nnoremap <Down>  :resize -2<CR>    nnoremap <Left>  :vertical resize +2<CR>    nnoremap <Right> :vertical resize -2<CR>endif
Enter fullscreen modeExit fullscreen mode

As there is no quickest way to force one-self to use the home row for navigation.

Final Remarks

I hope that for some of you this post has been helpful for some, and I'm far from done with my current setup, in that sense this isvery much a toy that I continue playing on a nearly daily basis; now that being said and in order to get back to the original premise of the post; it is indeed a very powerful toy, specially when combined with other tools likeTmux, here is a sneak peak of myElixir 'IDE' powered byVim andTmux:

If you want to know more about my setup, or want toshare yours please leave a comment below.

Top comments(83)

Subscribe
pic
Create template

Templates let you quickly answer FAQs or store snippets for re-use.

Dismiss
CollapseExpand
 
bgadrian profile image
Adrian B.G.
Striving to become a master Go/Cloud developer; Father 👨‍👧‍👦; 🤖/((Full Stack Web|Unity3D) + Developer)/g; Science supporter 👩‍🔬; https://coder.today
  • Email
  • Location
    E EU
  • Education
    Bachelor of Economic Informatics
  • Work
    Cloud Engineer at CrowdStrike
  • Joined

dev.to where is the dislike button? :/

  1. VIM is not an IDE, just an editor that helps you write faster

  2. After you install 30 plugins and spend years of learning it you can come close to an IDE, but you lost a lot of time, for nothing.

  3. The length of the post and the config file is working against you, is proof that is not easy to work with, and still not doing a proper job

If you would use an IDE in a proper manner (See Visual Studio or intelliJ) you will realize that your productivity is not about writing text (what Vim excels at), is at making your code work in the real world. Is more about development and less about being a type writer.

If you write books, articles or pseudocode Vim is the best tool I agree, but
..
the devs usually need to do DB queries, work with env tools, debug, see static analyzers warning, deploy dockers, run automatic tests, do merges, do huge refactoring that touches many files, find the "blame" on a bug, and so on (without writing or remember CLI commands or wasting time to setup the IDE).

Just saying, as a "director" you should appreciate productivity and do not make "feels like home" decisions for work projects. Do not confuse "what I like to do" with "what I have to do, as a professional".

By not using the proper tool, that gives you the fastest and most productivity you are wasting your employers money, so you are not being professional, you are just selfish.

CollapseExpand
 
allanmacgregor profile image
Allan MacGregor 🇨🇦
Functional Programming Advocate, Author. Opinions are my own. https://allanmacgregor.com
  • Location
    Toronto
  • Education
    Bachelors in Computer Science
  • Work
    Senior Director of Engineering at Humi Inc.
  • Joined
• Edited on• Edited

Adrian,

VIM is a tool, every developer is entitled to its opinion and preference, VIM might not be the right fit for all stacks or all applications but I have successfully use it to work as you mention for writing, python development, elixir/erlang development.

IntelliJ is great and I use it for other kinds of development (ionic for example); I find the knee jerk reaction to the size of configuration file a bit risible, the configuration file as shared has support for several languages, stacks and some of my personal customizations.

Finally, I find that the ad hominem attack on the last part of your reply actually subtracts from what was actually some valid points on your argument.

CollapseExpand
 
bgadrian profile image
Adrian B.G.
Striving to become a master Go/Cloud developer; Father 👨‍👧‍👦; 🤖/((Full Stack Web|Unity3D) + Developer)/g; Science supporter 👩‍🔬; https://coder.today
  • Email
  • Location
    E EU
  • Education
    Bachelor of Economic Informatics
  • Work
    Cloud Engineer at CrowdStrike
  • Joined

I just wanted to raise awareness on "VIM priests" that spread their false gossips around, I probably sound more passive-aggressive then it should.

You just "forget" to mention that it is a personal preference, and state that "Vim is the perfect IDE" (for me?!), knowing in fact that is not even an IDE and not perfect. You "forget" to mention that you spent maybe years of being prolific, where in IDE's most of the things "just works".

VIM is great when you have many small scripts/projects, or you alter big projects with minimal invasion, edit big files, or you are a sys admin, or ...(insert here a lot of stuff you didn't mention), but ....

It is "a common trap" that I've seen are with web dev juniors, they usually:

  • find a post like this
  • decide to try VIM and like it
  • they are getting very good at coding (typing fast,and moving around the document)
  • they have thefalse productivity feeling (the amount of code != solving more business problems)
  • they advance to bigger projects (as in scope and LOC count), and hit some walls. Then invest more and more time in their VIM skills and configs, and in the end being less productive.

This combined with the fact that people hate change, leads to bigger problems once the developer gets involved in bigger and more complex projects.

I just want to make things clear for the juniors and next generation of developers to make a big difference between "personal preferences" and "best tool for the job", and posts like this doesn't help at all.

Thread Thread
 
aghost7 profile image
Jonathan Boudreau
Containers all the way down.
  • Work
    DevOps Software Developer
  • Joined

Please keep in mind that everything you've said so far is anecdotal. Others, such as me, may have different experiences.

Thread Thread
 
dubyabrian profile image
W. Brian Gourlie
The foremost authority on mistake-driven development.
  • Joined
• Edited on• Edited

I tend to agree with BG. Tooling becomes vastly important when working with larger and more complex codebases. The kind of code analysis provided by actual IDEs simply cannot be replicated in Vim no matter how it's customized.

Vim is great, but Vim is ultimately just a powerful text editor. BG is correct in that the anti-IDE stance is alluring for junior devs, providing false machismo in the absence of experience and well-honed skills.

We really need to change the way we talk about Vim. Here are my suggestions:

  • Stop comparing it to emacs. They are vastly different things.
  • Let's distinguish Vim "the concept" from Vim "the application."
  • What's important here is Vim, the concept

Vim,conceptually, is mode-based text editing with consistent, highly optimized keybindings. The beautiful thing about vim-as-a-concept is that it's available in some form or fashion in nearly every IDE and text editor.

Thread Thread
 
bgadrian profile image
Adrian B.G.
Striving to become a master Go/Cloud developer; Father 👨‍👧‍👦; 🤖/((Full Stack Web|Unity3D) + Developer)/g; Science supporter 👩‍🔬; https://coder.today
  • Email
  • Location
    E EU
  • Education
    Bachelor of Economic Informatics
  • Work
    Cloud Engineer at CrowdStrike
  • Joined

"vim-as-a-concept is that it's available in some form or fashion in nearly every IDE and text editor." ... andbrowser.

Thread Thread
 
aghost7 profile image
Jonathan Boudreau
Containers all the way down.
  • Work
    DevOps Software Developer
  • Joined

In my line of work, I've seen little to no benefit with static analysis. I am working on a highly dynamic codebase. Sure, if your language is static its great, but I really don't see this as being a reason for not using VIM. I've actually seen VIM autocompletion be more accurate than IDE's (for newer languages such as Rust).

Thread Thread
 
bgadrian profile image
Adrian B.G.
Striving to become a master Go/Cloud developer; Father 👨‍👧‍👦; 🤖/((Full Stack Web|Unity3D) + Developer)/g; Science supporter 👩‍🔬; https://coder.today
  • Email
  • Location
    E EU
  • Education
    Bachelor of Economic Informatics
  • Work
    Cloud Engineer at CrowdStrike
  • Joined

I am very curious in what languages/line of work there are no benefits for static analysis, can you give some examples?

Thread Thread
 
aghost7 profile image
Jonathan Boudreau
Containers all the way down.
  • Work
    DevOps Software Developer
  • Joined

Javascript - we use dependency injection heavily.

Thread Thread
 
bgadrian profile image
Adrian B.G.
Striving to become a master Go/Cloud developer; Father 👨‍👧‍👦; 🤖/((Full Stack Web|Unity3D) + Developer)/g; Science supporter 👩‍🔬; https://coder.today
  • Email
  • Location
    E EU
  • Education
    Bachelor of Economic Informatics
  • Work
    Cloud Engineer at CrowdStrike
  • Joined

wow ok, your team is great then! I was part of teams that didn't used but we ended up regretting.

I usually saw linters solving a lot of (very small) problems in large teams and projects, like (forces a coding standard, find small bugs like forgetting to type a var or forgetting a switch default, fewer git merges/conflicts) which leads to a better codebase in general (if you enforce the rules at commit/build).

As a sidenote linters are builtin in most IDEs so maybe you use them already, but only at a basic level.

Thread Thread
 
aghost7 profile image
Jonathan Boudreau
Containers all the way down.
  • Work
    DevOps Software Developer
  • Joined
• Edited on• Edited

We use eslint (for the older projects, a combination of jshint and jscs). The plugin I use for vim (ale) works with pretty much any kind of linter I've encountered.

This isn't the sort of static analysis I'd expect from and IDE though, this is what I'd expect from any kind of programmers editor (vscode, sublime, etc). What I meant by static analysis is the ability to goto definition, display documentation, refactor, etc. This is the sort of stuff which doesn't work consistently enough with our codebase to even bother trying.

CollapseExpand
 
jaredcobb profile image
Jared Cobb
I build things on the web. I also break things on the web.
  • Location
    Raleigh, NC
  • Joined

Ha, these kinds of comments always baffle me...

Your comment can be summarized as:

Your personal preference is wrong... You are not more productive with your favorite tools.

It's like telling someone "No, you shouldn't like chocolate", or "Your favorite movie is wrong".

CollapseExpand
 
alainvanhout profile image
Alain Van Hout
A software developer with a passion for architecture and an affinity for Java and JavaScript
  • Location
    Antwerp
  • Joined

Chocolate and movies are indeed a matter of taste, but productivity is not (also note that 'feeling productive' and 'being productive' are two different things).

Of course, these kind of discussions tend to spiral into the following, myself included :-)

Duty Calls

CollapseExpand
 
bgadrian profile image
Adrian B.G.
Striving to become a master Go/Cloud developer; Father 👨‍👧‍👦; 🤖/((Full Stack Web|Unity3D) + Developer)/g; Science supporter 👩‍🔬; https://coder.today
  • Email
  • Location
    E EU
  • Education
    Bachelor of Economic Informatics
  • Work
    Cloud Engineer at CrowdStrike
  • Joined

That is the problem, he didn't specified it is a personal preference, he said it as an absolute truth and other people can make wrong decisions.

Thread Thread
 
rudreshdixit profile image
rudresh-dixit
Enthusiastic developer.
  • Location
    India
  • Work
    Student at Student
  • Joined

Wow great insight
I actually wasted a lot of time in this stuff. Your insights. are very useful to me

CollapseExpand
 
chandwki profile image
Chris Handwerker
  • Joined

Linux, the whole environment, is your IDE. Vim is just one part of it.

CollapseExpand
 
ronbarhash profile image
ronbarhash
  • Joined

B.G. ..... My subjective opinion: you are bore and hysterical. It is a fact. And all about what you find fault with the author of the article applies to your claims. All this is subjective, even your praised productivity.

I apologize for my english - google translate.

"Stay hungry ..stay foolish.". Steve Jobs.

CollapseExpand
 
bgadrian profile image
Adrian B.G.
Striving to become a master Go/Cloud developer; Father 👨‍👧‍👦; 🤖/((Full Stack Web|Unity3D) + Developer)/g; Science supporter 👩‍🔬; https://coder.today
  • Email
  • Location
    E EU
  • Education
    Bachelor of Economic Informatics
  • Work
    Cloud Engineer at CrowdStrike
  • Joined

Nope sorry, productivity can be measured, and the time you invested to reach that level.
Also my claims can be easily verified after one week of Vim.

Thread Thread
 
atbtavares profile image
André Tavares
  • Location
    Brazil
  • Joined

sorry, client satisfied can be measured only

Thread Thread
 
hisownspace profile image
David Nash
  • Work
    App Academy
  • Joined
• Edited on• Edited

I'm sorry but this statement is ludicrous. Productivity can indeed be measured, but the metrics you choose to measure are completely subjective.

That's somewhat besides the point, but coming from someone who seems downright angry that someone else presents subjective fact as the truth, your assertion is beyond hypocritical.

More importantly, it's absurd to argue that vim is inherently less productive than using any IDE. I keep hearing how vim users are preachy and judgmental, but I have never heard anything from a vim user as dogmatic, condescending, ignorant or absolutist as anything you've said in this thread.

Thread Thread
 
nikfp profile image
Nik F P
I do a little bit of a lot of things. Some of those things are code. I enjoy thinking about how the world and technology interact, and how technology affects the way people interact with each other.
  • Joined

Well stated and to the point.

CollapseExpand
 
mathslover profile image
Suraj Pal Singh
Still a student learning various things.
  • Location
    India
  • Education
    Studying at NIE (North), Mysore
  • Pronouns
    He/Him
  • Work
    Working as Go backend developer at Mactores Cognition Inc.
  • Joined

Well I partially agree with you.
As I use NeoVim for all my dev purposes, earlier I used to use Jetbrains' GoLand with vim plugin, I couldn't feel much difference as long as productivity is concerned. Only reason I shifted to NeoVim was so that I don't have to use mouse, and I was too busy to learn Jetbrains' shortcuts.

I was able to replicate most functionalities... debugger you say? yes that is one major caveat in Vim or Neovim, etc. but I was able to successfully integrate that too in vim.
I have heavily customized init.vim (not too many plugins, around 10-15) and I can work very fast while doing my work.

What I'm trying to say is,
Vim alone --> just an editor
Vim with right set of tools (I don't mean plugins here) --> a Development Environment, only difference is they are not integrated, hence not an IDE.

Now I'm not any pro or something like that, but the works that I have done till now, I can tell I was more productive with NeoVim with conjunction to some other tools when compared to an IDE.

CollapseExpand
 
ludamillion profile image
Luke Inglis
A full stack developer leaning ever harder into the frontend world.
  • Location
    Boston, MA
  • Education
    Umass Boston
  • Pronouns
    He/Him
  • Work
    Senior Software Engineer at Lifespeak
  • Joined

the devs usually need to do DB queries, work with env tools, debug, see static analyzers warning, deploy dockers, run automatic tests, do merges, do huge refactoring that touches many files, find the "blame" on a bug, and so on (without writing or remember CLI commands or wasting time to setup the IDE).

I can do pretty much all of that in Vim with only a handful of plugins and little configuration. Also of note I've been in the biziness for roughly 7 years and have never had to deploy a container. 🤷🏼‍♂️ YMMV

CollapseExpand
 
transcendenting profile image
...
  • Joined

This, so much. I downloaded VSCode, used a clean GUI to install a few plugins, and I was developing nodeJS in minutes. That vimrc convinced me to never use the editor for anything serious.

CollapseExpand
 
huaca profile image
Hugo Cabrera
I help people find IT solutions and a digital trasnformation evangelist
  • Location
    Ciudad de México
  • Joined

where is the dislike button?

VIM is awsome, but not for everybody

CollapseExpand
 
bgadrian profile image
Adrian B.G.
Striving to become a master Go/Cloud developer; Father 👨‍👧‍👦; 🤖/((Full Stack Web|Unity3D) + Developer)/g; Science supporter 👩‍🔬; https://coder.today
  • Email
  • Location
    E EU
  • Education
    Bachelor of Economic Informatics
  • Work
    Cloud Engineer at CrowdStrike
  • Joined

Correct
vim exit

I am actually using Vim, my point is that title of the post should be "Vim is the perfect IDE ... for me".

CollapseExpand
 
georgeoffley profile image
George Offley
Software engineer looking to make software.
  • Location
    United States
  • Education
    B.S. in Computer Science
  • Work
    Software Engineer
  • Joined

^ This person is my favorite.

CollapseExpand
 
dtoebe profile image
Daniel Toebe
  • Joined

I'm in the same place. It seems like one a year I go out and try out other editors or IDEs, and always find myself in vim. Well now Neovim and using deoplete. I've tried the new language server protocol, but had some prefomance issues. To answer the question below. I primarily develop Go these days so I have that deeply integrated. Delve for breakpoints, I get in line errors as well simple key bindings for extra go metalinter tooling. It does take work and your config is a living setup.

CollapseExpand
 
maxdevjs profile image
maxdevjs
bla bla bla
  • Joined

Would you mind to share your Go config for (Neo)vim?

CollapseExpand
 
roxchgt profile image
Roshak Zarhoun
later*

Yes@dtoebe ! I would appreciate it as well

CollapseExpand
 
lancecontreras profile image
Lance Contreras
I code for coffee and I drink coffe to code.
  • Education
    MS Computer Science
  • Work
    Senior Software Developer
  • Joined
• Edited on• Edited

I'm a vim fanboy, I really think it's a great tool but it's far from being perfect. The great thing about vim, as you demonstrated in this post is that there's an unlimited amount of customization you can do to it. With that, I can't imagine two developers having the same set of plugins and the same vimrc file. It's just so personal.

The title you've chosen is somehow provocative that's why I can see some violent reactions here. But I understand, that's not your intent.

For me the best way to learn vim is to see how others use it. And I appreciate you sharing what you got. Thanks!

CollapseExpand
 
georgeoffley profile image
George Offley
Software engineer looking to make software.
  • Location
    United States
  • Education
    B.S. in Computer Science
  • Work
    Software Engineer
  • Joined

I'd also like a dislike button. VIM is like all kids in the 80s who knew how to solve the Rubik's cube puzzle decided to make and IDE version. An over complicated, hard to figure out editor. Which they can feel superior in using knowing that only they know how to use it.

CollapseExpand
 
tnolte profile image
Tim Nolte
I enjoy keeping up on all of the changes in technology, especially on the web front. My passion is for developing web-based applications and backend services to help businesses get more done.
  • Location
    Michigan, US
  • Education
    South Central College, North Mankato, MN
  • Work
    WordPress Developer at Forum One
  • Joined
• Edited on• Edited

What do you care what another developer uses? This sounds like just another Mac vs Windows vs Linux argument that is all opinions

BTW, I know of companies that use Notepad++ as their "IDE" and in my opinion it's no different than vim(or a variant like Neovim).

CollapseExpand
 
georgeoffley profile image
George Offley
Software engineer looking to make software.
  • Location
    United States
  • Education
    B.S. in Computer Science
  • Work
    Software Engineer
  • Joined

I don't care what another developer uses. It literally does not matter, in the long run. However I like these arguments. It's always funny to see the more extreme reactions and insightful to see the discussions to these small details.

Do you know why I love these arguments? Simply because I'm not arguing with some faceless twitter avatar about why women, people of color, LGBTQ+ people are under represented (or underpaid) in STEM fields. I don't have to make some passionate argument as to why basic human decency and inclusion should apply to everyone.

You get into a having a real discussion about people's experiences and why these features matter from one person to the other. I just enjoy the debate.

You're right though, it does not matter.

CollapseExpand
 
paroxallax profile image
Triston Chavez
  • Joined
• Edited on• Edited

I love vim. I started learning java on a Chromebook, which Eclipse proved too much for and wound up on Codenvy. From there I messed with IntelliJ and Eclipse Photon but I really didn't like either. Especially Eclipse photon plugins suck, the ui feels laggy, there are tiny mostly inconsequential bug that are just annoying enough to trigger my OCD. I get the benefits on a larger code base but vim is something that can be fine tuned. Sure it's more work, but I can be sure vim (neovim) will work smoothly and exactly how I want. The LanguageClient plugin I run is way more consistent than the vscode redhat plugin and they share a jdt.ls! I'm an obsessive tinker and vim fulfills both for me!

CollapseExpand
 
vlasales profile image
Vlastimil Pospichal
  • Joined

Too much plugins for too little benefits. I do not traverse the directory tree. I search files, I search for words in files. I use abbreviations and macros for writing code, refactoring, compiling, testing,... everything in the Vim. I don't want IDE. I like my Vim.

CollapseExpand
 
readyready15728 profile image
readyready15728
  • Joined

I'm somewhere in between you and the OP. Here's my configuration:

github.com/readyready15728/dot-vimrc

I've chosen to be pretty conservative with it so far but Vundle and a number of the things that can be installed with it are really good. That said, at this time I still only have nine Vundle plugins downloaded.

CollapseExpand
 
ug02fast profile image
Arthur Zhuk
Big fan of Vim, builds software as a side-effect.
  • Email
  • Location
    Scottsdale, AZ
  • Education
    42
  • Work
    Software Engineer at Saddle Finance
  • Joined

A lot of people can't grasp this.

CollapseExpand
 
tomerbendavid profile image
Tomer Ben David
Check out my podcast programmers quickie - https://podcasts.google.com/?feed=aHR0cHM6Ly9hbmNob3IuZm0vcy8xMzMwMjI0L3BvZGNhc3QvcnNz&ep=14
  • Joined
• Edited on• Edited

"Vim is my default Ruby, Elixir, Python, PHP IDE" . I have noticed all these languages are dynamically typed.

You can't compare the power of intellij for statically typed languages over any text editor as sophisticated as it can be. I have noticed as well that for dynamically typed languages it's not that much of a powerful difference (there is but not as for statically typed languages) if you use a light text editor or ide.

  1. Can it show show call hierarchy?
  2. The exact types of expressions? Show method callers?
  3. Search for variable references?
  4. Search for function references?
  5. Suggest and complete function and variables types?
  6. Show compile errors as you type? In code itself (red line).
  7. Refactor correctly large codebase?
  8. Suggest to change parent variable name or.method names when refactoring child?
  9. Powerful debugger.
  10. Build in coverage markers.
  11. Git annotate blame in source code.

Much more powerful stuff which help maintain and analyze codebases and projects not written by me. Or written by me and maintained by others.

CollapseExpand
 
paroxallax profile image
Triston Chavez
  • Joined

8 Of these things are covered under LSP specs. LSP really makes these features portable to just about any editor that can implement LSP client.

CollapseExpand
 
perrydbucs profile image
Perry Donham
I'm on the faculty at Boston University in the computer science department, where I teach software engineering, intro courses, and application architecture and development. Also a bit of a Deadhead.

Not a snarky comment, I'm truly curious: How tough is to do debug tasks (set breakpoints, view/modify variables, etc)?

CollapseExpand
 
allanmacgregor profile image
Allan MacGregor 🇨🇦
Functional Programming Advocate, Author. Opinions are my own. https://allanmacgregor.com
  • Location
    Toronto
  • Education
    Bachelors in Computer Science
  • Work
    Senior Director of Engineering at Humi Inc.
  • Joined

Closest thing you get to an IDE debugging support would be something likegithub.com/vim-vdebug/vdebug which supports PHP, Python, Ruby, Perl, Tcl and NodeJS.

CollapseExpand
 
avasconcelos114 profile image
Andre Vasconcelos
Brazilian Frontend Developer currently working in South Korea
  • Location
    Seoul, South Korea
  • Work
    Senior Solution Engineer at ArchitectGroup
  • Joined
• Edited on• Edited

Tried to set up my vim using your.vimrc file. The plugin install hangs on thejakedouglas/exuberant-ctags plugin, further examining revealed the repo on github no longer exists

Note: Fixed by removingPlugin 'jakedouglas/exuberant-ctags' line and installing package withsudo apt-get install exuberant-ctags instead (on Ubuntu 16.04)

CollapseExpand
 
graycatfromspace profile image
Jacob D.
  • Joined

How many times are you going to repost this same article?

 
spiperac profile image
badarg
  • Joined

Slows you down? Not sure what are you working on, but if i can guess i'd say you are writing a novel, and in that case it's understandable.
I usually write ~500 lines of code a day ( mega wild guess), and that takes around 1-2hr of an actual productive work, everything else is debugging, looking into documentation or staring at the wall.
If you are a dev tho, i really can't see what's slowing you down, except if you are mashing random keystrokes 8 hours a day straight and calling that 'programming'.

Some comments may only be visible to logged-in visitors.Sign in to view all comments.

Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment'spermalink.

For further actions, you may consider blocking this person and/orreporting abuse

Functional Programming Advocate, Author. Opinions are my own. https://allanmacgregor.com
  • Location
    Toronto
  • Education
    Bachelors in Computer Science
  • Work
    Senior Director of Engineering at Humi Inc.
  • Joined

More fromAllan MacGregor 🇨🇦

DEV Community

We're a place where coders share, stay up-to-date and grow their careers.

Log in Create account

[8]ページ先頭

©2009-2025 Movatter.jp