10 ms·
I'm curious: - How deep a rabbit hole do most people go down when setting up their vim / neovim environment? Apart from setting up a preferred color and langua
by givemeethekeys 4y ago
I'm curious:
- How deep a rabbit hole do most people go down when setting up their vim / neovim environment?
Apart from setting up a preferred color and language specific tab spacing and highlighting, I don't need more, but I've seen some pretty fancy setups.
Out of the different plugins, which would you never operate without?
- cercatrova 4y agoOut of everything, if I want to use (neo)vim as a serious code editing environment, it has got to be LSP support. To that end, I use coc.vim although of course there are many other LSP plugins.
- jl6 4y agoI put some time into learning vanilla vim to a fairly basic level, about 20 years ago. It’s been sufficient ever since. Occasionally I look up rarely used commands, but as far as I’m concerned my configuring days are over.
- VTimofeenko 4y agoI've gone down that rabbit hole quite a few times and each time for a much longer period than I am willing to admit. I use neovim for hobby development and as a general text editor. The plugin that I find myself using all the time is vim-surround with a couple of minor language-specific tweaks.
- deleted 4y ago[deleted]
- dbrueck 4y agoNo idea if I'm typical or an outlier, but I have a couple of syntax highlighting plugins, NLKNguyen/papercolor-theme, a vim rc file with my favorite keybindings (e.g. faster navigation among splits), and a python file with some helpers for opening terminals in vim and... that's it. Every once in awhile I think I might do a fancier setup but then I lose interest. Ditto for checking out neovim. I'm sure I'd get some gains, but I guess I've sort of settled into a decent sweet spot that I haven't left for almost a decade, haha (been using vim for ~25 years total).
- aidos 4y agoIt’s definitely a deep rabbit hole. There’s a lot to figure out - even as an old vim user moving to a more modern neovim setup about a year ago. One of the issues I found was that every plugin seemed to reference other plugins and you need to figure out how to make them play nicely together yourself. Most of the best info is just buried in GitHub issues and neovim was such a moving target that everything needed more digging into to get working correctly. For me now essentials include; Telescope, Trouble, Cmp and a good LSP setup.
- trufas 4y agoThe fzf plugin is really nice for navigating through files and for code search, but not really necessary. The editing plugins I use most heavily are probably vim-surround and vim-commentary. My development would definitely slow down without them.
- nobleach 4y agoFor me, I'll say "never ending-ly" deep. I've been hacking on Vim for the last 20ish years. First plain old Vim, and in the last 3 years, NeoVim. Even this morning I started by switching out VSnips (snippet manager) for Luasnip. I am always looking at things that could make my dev life more streamlined. I don't really care so much about having a bunch of bling plugins (although I do have a nice status bar, and a file tree). I'm more looking more at the things that I do on a day to day basis. Are there existing plugins that fit those patterns? If there are, I try them out. Sometimes I have to write the functionality myself. (Want to console log the variable under my cursor, with a label? Done.) Since this editor (and Emacs) are SO extensible, it's hard to find two long-time users with similar configs.
- JulianWasTaken 4y agoIt depends what kind of person you are, how much energy you want to invest, how much patience you have for stuff that isn't the code you're writing, how much you enjoy editing itself, etc. I have a quite extensive setup (https://github.com/Julian/dotfiles/tree/main/.config/nvim https://github.com/Julian/dotfiles/tree/main/.config/nvim) which I built up over 10+ years, indeed sometimes including sitting there for an hour or two and just investigating plugins or writing some function to make editing easier. I enjoy it, and it means I can do lots of things in my setup that involved time investment. Others obviously just want to get on with their work. To me though part of the reason I use vim/neovim is because anytime something annoys me about editing I can automate it, or find a plugin which has done so already.
- willjp 4y agoThis is what I love about vim. Ironically, I think that the barrier to writing a plugin that solves your problems is lower in vim than an IDE. Pair that with portability, and you have a cozy environment you can feel safe investing hours into.
- hulitu 4y agoI don't set anything. I use vim as vi.
- kirillbobyrev 4y agoI've spent so much time on configuring my (Neo)vim over the years I wouldn't even be able to estimate it (here it is if you're curious: https://github.com/kirillbobyrev/dotfiles/tree/main/.config/nvim https://github.com/kirillbobyrev/dotfiles/tree/main/.config/...). The most important ones lately seem to be the LSP integrations (basically IDE features like autocompletion, go-to-definition etc) and auto-completion managers. But honestly it's been breaking all the time over the last year or so that I code more often in VSCode and maybe it's about time I stop trying to make an ever-improving IDE out of Neovim :( Neovim project's direction seems to be aligned with making it easier to have IDE-like experience with LSP integration but it's been painful in Neovim. In Vim, it's typically even worse and even harder to set it up. Overall, I've been using Vim for about 8 years and went from a really simple set-up of "this is just a text editor" down the IDE rabbit hole. I also went for Vim -> Neovim -> Vim -> Neovim and eventual split of the two configs in the end and. I'm thinking about making it much simpler again :D
- kzrdude 4y agoI'd always use airline and show a buffer line with it.
- honkycat 4y agoCheck out LunarVim, it is excellent.
- mayama 4y agoAlso nvchad if you want to easily override builtin config from the starterkit.
- dvogel 4y ago$ du -s -h .vim 22M .vim A lot of that is git submodule history. Specific plugins I use all the time: bufexplorer (though I've mostly rewritten it), ctrlp, colorizer, syntastic, vim-commentary, vim-projectroot, vim-surround, zeavim (Zeal integration, similar to Dash on macos).
- Seb-C 4y agoI have got a stable setup and been happy with for many years now. I would say that the plugins I could not do without are: - vim-polyglot - syntastic - nerdtree - coc.vim
- pellucide 4y agosurprised noon mentioned :set hlsearch
- waych 4y agoI think this really depends on whether you have a good way to track your dotfiles or not, as configuration is accretive with time: you make changes as you find you need to scratch an itch. Config changes are lost without some way to sync across systems. Previously to managing my dotfiles, my .vimrc was usually 4-5 lines, written by hand on each machine I sat at. This was my first 20+ years of vi/vim. Once I started managing dotfiles across systems (~3 years ago), my .vimrc has grown to be ~700 lines. My .bashrc has also grown to almost as much for reference. Like most, the work in customizing .vimrc is in configuring plugins and making sure they don't conflict with each other, but also, I've taken care so that I can use the same configs across Linux and Windows, allowing me to use the same tools, plugins and configurations regardless of the underlying OS. Neovim is my tool of choice on both OSes but my configs fallback well to vim or other vi implementations rather gracefully (via bash/pwsh alias trickery) for when needed. Regarding plugins that I would never operate without (of the many installed): - nerdtree (and friends like nerdtree-git-plugin, vim-nerdtree-syntax, vim-devicons) for decent file nav integration - vim-fugitive (Git integrated into vim, makes interactive commit creation and navigation easy from within vim) - Coc for language server support that works on both sides of the fork and vscode like plugins. Also, not a plugin, but worth configuring in your environment: neovim-remote. I use this to make "vi <file>" open the file in a new tab, rather than start a nested editor, from within a terminal window within neovim (again with more shell alias trickery dependent upon $NVIM_LISTEN_ADDRESS being set or not). Using it for $EDITOR and $VISUAL when NVIM_LISTEN_ADDRESS is set is also really useful when invoked indirectly by tools being run in a windowed terminal e.g. "git commit" or "kubectl edit". If you aren't tracking dotfiles, I really suggest you start. It's really cool to be able to sit at a new system, sync some files and get your editor / development environment installed/booted with all the bells and whistles you like installed ready to go. You will find that there is no end to this rabbit hole in the end. I think that's a good thing :)
- johncoltrane 4y agoIt's only a rabbit hole if you want it to be one. Vim only has that reputation of needing a lot of config because too many newbies want to skip the learning phase and just jump in between two JIRA tickets. Of course you will need a lot of plugins and pre-baked stuff and hand-holding in that case! The more sensible path is to learn Vim properly, and configure it as you go. It means that there's never a "take the week-end to configure Vim for React" moment: it's one line here, two lines there and it never really stops because you work with new languages and libs, etc. As far as plugins. I can use Vim just fine without plugins or without my config but half of the plugins I use are written by me and tailored around my own needs so I guess those are the ones I need the most for my daily use.
- usrbinbash 4y ago.vimrc currently sitting at about 275 lines (including whitespace and comments). A big chunk of that came with the terminal integration, as I'm using `term_sendkeys` heavily.
- gosukiwi 4y agoALE and CTRLP are the most non-vimmish ones I guess. Most of my remaining plugins are extensions to Vim, like highlighting unique characters when pressing f, or highlighting my latest yank, or more text objects, or autopairs, surround, etc.
- rbongers 4y agoDefinitely ALE. Being able to use LSPs is the only reason I haven't switched.
- Diederich 4y agoI've been using vi/vim on a near daily basis for 34 years now and this is the only thing I put in ~/.vimrc: set tabstop=4 set expandtab set shiftwidth=4 " or 2 or whatever set shiftround syntax on EDIT: Just for some fun archeology, I google searched on the 3rd line, 'set shiftwidth=4 " or 2 or whatever' because I very dimly recall copying most of my standard set (minus the syntax on bit) from someone else a long long time ago. This was the only hit I found: https://www.perlmonks.org/index.qs1968.pl/perlmonks.org?displaytype=displaycode;node_id=441738 https://www.perlmonks.org/index.qs1968.pl/perlmonks.org?disp...
- jcranmer 4y agoTIL about set shiftround... that would definitely help with > commands...
- quasarj 4y agoMe too, dang.
- pbohun 4y agoDoesn't expandtab mess with creating/editing makefiles?
- Diederich 4y agoIt surely can. If I have to casually mess with a Makefile, I'll just remember to use control-v TAB as needed, or vi yank/put another line with a proper tab and edit. In the very rare case I'm doing more serious work, I'll temporarily turn it off.
- mr_toad 4y agoIt’s been a while but I seem to remember being able to configure different tab behaviour specifically for make files.
- Beltalowda 4y agoThe ftplugin for the make filetype includes setlocal noexpandtab, which should take precedence over what's in your vimrc. % vim Makefile :verbose set expandtab? noexpandtab Last set from /usr/share/vim/vim90/ftplugin/make.vim line 15 % vim file.c :verbose set expandtab? noexpandtab Last set from ~/.vim/vimrc line 56 but I think that may not work as intended for OP as they don't have "filetype on plugin".
- Bromeo 4y agoHaving gone from a stock vim to a highly modified vim and back again, here are some plugins that I find really boost my productivity: - neoterm, for opening a REPL in a split buffer and quickly sending chunks of lines to the REPL (https://github.com/kassio/neoterm https://github.com/kassio/neoterm) - fzf for faster buffer and file navigation (https://github.com/junegunn/fzf.vim https://github.com/junegunn/fzf.vim) - vim fugitive for good git integration (https://github.com/tpope/vim-fugitive https://github.com/tpope/vim-fugitive) - some other tpope plugins (surround, unimpared, commentary, vinegar)