Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I use nvi, and have tried to switch to vim a dozen or so times over the years. But there are so many irritating little quirks and misfeatures and annoyances that I can never manage to fix. Does anyone know of a guide to getting a sane, non-broken vim working with some basic plugins like syntastic? Last time I tried I couldn't bind F-keys for some reason, I couldn't get syntastic's error marking column to stay on instead of shifting my text back and forth all the time, I couldn't get auto-complete mapped to tab properly, and a few other things I can't remember now. I eventually gave up again as the extra functionality of vim ends up being counter-productive when none of it works right.


>> Does anyone know of a guide to getting a sane, non-broken vim working with some basic plugins like syntastic

There are a number of vim-setups that are popular. janus (https://github.com/carlhuda/janus), spf13 (https://github.com/spf13/spf13-vim) are pretty popular ones.

>>Last time I tried I couldn't bind F-keys for some reason F keys bind fine for me, using OS X Terminal, and gnome-shell in linux. Are you using an esoteric term?

>> I couldn't get syntastic's error marking column to stay on instead of shifting my text back and forth all the time That is using the SignColumn part of vim. As far as I know, vim doesn't allow you to force the existance of SignColumn. You can open up a bug report at their Google Code repo if you think its worthwhile

>> I couldn't get auto-complete mapped to tab properly Depending on your language, YouCompleteMe (https://github.com/Valloric/YouCompleteMe) is amazing, but if you don't do C based stuff NeoComplCache is great too (http://www.vim.org/scripts/script.php?script_id=2620)

>> the extra functionality of vim ends up being counter-productive when none of it works right To be fair, thats true of any tool.


It sounds like you want vim features. But vi compatibility mode is probably not consistent with these. Mapping f-keys should work fine in a GUI vim, but in a terminal F-keys may depend on configuring the terminal. You don't have to use syntastic if it doesn't work right for you, you can just use individual checker plugins or set makeprg and use :make. Mapping auto-complete to tab depends on not having multiple plugins fighting over the key. Most of this is a matter of particular plugins, not vim itself.


Right, I want some of the vim features, mainly plugins. I don't enable vi compatibility, it isn't even remotely vi compatible and it just breaks stuff. I want syntastic, that's the primary motivation for trying to get vim working. I just want it to be helpful instead of irritating. No plugins are messing with tab, I am just trying to get it to work using a normal mapping.


>> I couldn't get syntastic's error marking column to stay on instead of shifting my text back and forth all the time

Try this:

    augroup syn_gutter
        au BufWinEnter * sign define mysign
        au BufWinEnter * exe "sign place 1337 line=1 name=mysign buffer=" . bufnr('%')
    augroup END
Bonus fancy character bling: let g:syntastic_error_symbol='✗' let g:syntastic_warning_symbol='⚠'




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: