Re:Show HN: A workshop on how to use Vim plugins
by gkop on Thursday February 26, 2015 @10:52AM
(#9113117)
This guide introduces some neat plugins. However one plugin that is widely useful but missing from this guide is YouCompleteMe [0] which gives you smart, general-purpose, automatic, token-based autocomplete.
Re:Show HN: A workshop on how to use Vim plugins
by slimetree on Thursday February 26, 2015 @02:43AM
(#9111493)
Am I the only one who prefers to use Vim bare and just have a terminal open in another tab/window? For some reason having all these plugins weighs me down in a spiritual way, where the benefits of being able to edit a bit of text or open the right file more quickly get drowned out by these extra objects on my desk I have to keep track of.
Re:Show HN: A workshop on how to use Vim plugins
by keslag on Thursday February 26, 2015 @06:42AM
(#9112074)
When I go to a construction site, I only bring a hammer. I feel a screw driver would weigh me down spiritually. Sure, it could be useful, but I sometimes show up at construction sites and all they have is a hammer. Keeping a toolbox of tools, is just more stuff that I have to keep track of.
Re:Show HN: A workshop on how to use Vim plugins
by Gracana on Thursday February 26, 2015 @10:04AM
(#9112823)
I think it's a bit unfair to call vim and all the standard command-line tools in a typical linux distro "a hammer." There is a hell of a lot you can do before you begin to customize them.
Re:Show HN: A workshop on how to use Vim plugins
by chongli on Thursday February 26, 2015 @09:39AM
(#9112699)
Nope. I use a bare vim as well. Or should I say, the vim that is installed by my package manager. It includes a lot of plugins in the system runtime path but those are mainly file format and syntax plugins.
I used to use a really tricked out vim with crazy stuff like neocomplete and unite.vim. Then for a while I used plain old vi on FreeBSD (aka nvi). After switching back to arch linux I decided to use bare vim since nvi still has some annoying bugs.
So much of the stuff people write plugins to do can be done more easily and simply with macros and/or the ! or = commands.
Re:Show HN: A workshop on how to use Vim plugins
by edwintorok on Thursday February 26, 2015 @03:01AM
(#9111539)
Out of the plugins listed there the most useful ones that actually save me time are CtrlP and Syntastic.
Syntastic is useful because it can give (visual) feedback on exactly which lines have warnings/errors a lot faster than recompiling the project. Also I find it easier to use than :make and :cope.
You can setup CtrlP to take its file list directly from git ls-files: very convenient for working with largish projects where files are in subdirs. And if you press Ctrl-t it opens the file in a new tab instead of replacing the currently open one (YMMV).
Depending on the language(s) you use there are other plugins that might be useful, and you can keep using the terminal as a separate app, and for specific operations (like git commit/grep and such).
In fact for a long time I was launching Vim from a terminal (with tabs), but I found out that I had dozens of Vim processes running in the background by the end of the day.
So I switched to using GVim + separate terminal app now.
Re:Show HN: A workshop on how to use Vim plugins
by mercurial on Thursday February 26, 2015 @04:39AM
(#9111779)
Some plugins are fairly transparent (eg, ocp-indent for OCaml improves indentation but doesn't get in your way). Others are great productivity boosters. I can't imagine working without syntastic, and fugitive+git-gutter are great productivity boosters.
It is however easy to get overboard and install a great many plugins you don't really need.
Re:Show HN: A workshop on how to use Vim plugins
by yodsanklai on Thursday February 26, 2015 @02:52AM
(#9111517)
Some plugins really increase your productivity. For instance CtrlP or Syntastic. But I agree that sometimes it feels overwhelming to have all those things enabled, and sometimes not even being sure what they do and how to use them.
Re:Show HN: A workshop on how to use Vim plugins
by Pawka on Thursday February 26, 2015 @05:57AM
(#9111965)
Common mistake for new vim users - include many cool plugins and forget to read manuals. Before I did the same too - just used single of just few plugin features. Result - multiple plugins which are covering each other features.
My 2 cents - read full plugin manual just after you install it.
Re:Show HN: A workshop on how to use Vim plugins
by exDM69 on Thursday February 26, 2015 @04:24AM
(#9111735)
No, you're not. I recently deleted all my Vim plugins from my .vim. The only ones I've occasionally missed are surround.vim and a commenting plugin.
Integrating tools to Vim is its Achilles heel. In particular, there's no reasonable debugger integration. And interaction with long running processes is difficult.
I use vim, cgdb and tig (for git) inside tmux. With cscope and ctags for code navigation, this gives me all the "IDE" features I need without any clumsy plugins.
Re:Show HN: A workshop on how to use Vim plugins
by laumars on Thursday February 26, 2015 @06:10AM
(#9111985)
I use tmux rather than terminal tabs, but aside that I'm the same as you in that I never bother with vim plugins.
Though a large part of the reason is because I'm constantly switching between different servers so it's one less config I need to synchronise (and being reliant on plugins that aren't present on half the systems you manage quickly becomes less productive than never using those plugins to begin with).
to see each buffer in a tab, plus minimum configuration to move between tabs with CTRL-PAGEUP/DOWN. Feels like switching tabs in a browser and it's easier to see which files you have open
" Switch buffers
" note that I must first define what is <C-PageUp> for rxvt
" http://cygwin.com/ml/cygwin-xfree/2006-07/msg00011.html
nmap <ESC>[5^ <C-PageUp>
nmap <ESC>[6^ <C-PageDown>
nnoremap <silent> <C-PageDown> :bnext<CR>
nnoremap <silent> <C-PageUp> :bprevious<CR>
Re:Show HN: A workshop on how to use Vim plugins
by lloydde on Thursday February 26, 2015 @06:47PM
(#9116357)
What are your thoughts on https://github.com/spf13/spf13-vim ? It might make a good link for in the "Now that I'm a plugin master, I want to..." end section.
Re:Show HN: A workshop on how to use Vim plugins
by vdaubry on Thursday February 26, 2015 @04:41AM
(#9111784)
Most of my co-worker using Vim as their primary editor happens to be really good at their job.
(Of course I wouldn't say that using Vim 'means' you're a good developers!)
[0] http://valloric.github.io/YouCompleteMe/
https://bitbucket.org/ZyX_I/vim/branch/default?head=bcdcd815...
I didn't try it yet, but it should be possible to make something like Gotham theme to work in it: https://github.com/whatyouhide/vim-gotham
I used to use a really tricked out vim with crazy stuff like neocomplete and unite.vim. Then for a while I used plain old vi on FreeBSD (aka nvi). After switching back to arch linux I decided to use bare vim since nvi still has some annoying bugs.
So much of the stuff people write plugins to do can be done more easily and simply with macros and/or the ! or = commands.
Syntastic is useful because it can give (visual) feedback on exactly which lines have warnings/errors a lot faster than recompiling the project. Also I find it easier to use than :make and :cope.
You can setup CtrlP to take its file list directly from git ls-files: very convenient for working with largish projects where files are in subdirs. And if you press Ctrl-t it opens the file in a new tab instead of replacing the currently open one (YMMV).
Depending on the language(s) you use there are other plugins that might be useful, and you can keep using the terminal as a separate app, and for specific operations (like git commit/grep and such). In fact for a long time I was launching Vim from a terminal (with tabs), but I found out that I had dozens of Vim processes running in the background by the end of the day. So I switched to using GVim + separate terminal app now.
It is however easy to get overboard and install a great many plugins you don't really need.
My 2 cents - read full plugin manual just after you install it.
Integrating tools to Vim is its Achilles heel. In particular, there's no reasonable debugger integration. And interaction with long running processes is difficult.
I use vim, cgdb and tig (for git) inside tmux. With cscope and ctags for code navigation, this gives me all the "IDE" features I need without any clumsy plugins.
Though a large part of the reason is because I'm constantly switching between different servers so it's one less config I need to synchronise (and being reliant on plugins that aren't present on half the systems you manage quickly becomes less productive than never using those plugins to begin with).
https://github.com/techlivezheng/vim-plugin-minibufexpl
to see each buffer in a tab, plus minimum configuration to move between tabs with CTRL-PAGEUP/DOWN. Feels like switching tabs in a browser and it's easier to see which files you have open
https://github.com/mihaifm/bufstop
I've also created Vimpanel (since we're talking about Vim as an IDE)
https://github.com/mihaifm/vimpanel
http://cmucc.org/talks/