by asicsp · 4y ago · 0 comments
Apart from the built-in features (like :terminal), somehow I haven't yet explored plugins to enhance my Vim usage. Granted that coding projects over 100 lines are rare for me, I still feel like I should try them out and see if I can get used to them. If not pure coding projects, at least for things like markdown, having a preview could help.
Avoid the massive omnibus plugin packages. I find they often try to turn Vim into something it's not.
Nothing against people who use and enjoy those -- I'm not advocating for elitism or purism. I just feel like if you really want Vim to look and feel like (e.g.) VSCode, you're better off using VSCode.
Instead, I've gotten the most out of the plugins that I've taken the time to hand-pick and configure myself. Largely because I took that time to understand them.
Plug 'ap/vim-buftabline' " Show buffers in the tab line.
Plug 'derekwyatt/vim-fswitch' " Switch between header and source files.
Plug 'farmergreg/vim-lastplace' " Reopen files at last edit position.
Plug 'fatih/vim-go' " Comprehensive Go support.
Plug 'junegunn/fzf.vim' " Fuzzy finder commands using fzf.
Plug 'liuchengxu/vim-which-key' " Show possible leader completions.
Plug 'majutsushi/tagbar' " Sidebar ctag browser.
Plug 'mbbill/undotree' " Sidebar undo branch browser.
Plug 'mhinz/vim-signify' " Show VCS markings in the sign column.
Plug 'mhinz/vim-startify' " Extendable start screen.
Plug 'ntpeters/vim-better-whitespace' " Highlight trailing white space.
Plug 'plasticboy/vim-markdown' " Extended markdown support.
Plug 'tpope/vim-fugitive' " Vim git porcelain.
Plug 'tpope/vim-surround' " Adds surrounding text object.
Plug 'tpope/vim-vinegar' " Improve netrw.
Plug 'vim-utils/vim-man' " Open man pages in Vim.
Plug 'w0rp/ale' " Lint engine and LSP client.
Cscope is built in (:cs). The kernels I work on have a make target for tags, which is also built in.
You might also like `clangd` and `scripts/clang-tools/gen_compile_commands.py` if by kernel(s) you meant the linux kernel. It's pretty neat!
Put together neovim, nvim-treesitter and nvim-lspconfig (which are both "official" plugins), and fzf.vim, and you end up with a decent IDE with only one non-official plugin.
Less plugins = less to go wrong, easier to reason about, less configuration needed, more zen.
Everybody's needs are different, of course, but I personally find that Vimwiki [1] gives me all the preview I need, right in the editor, when editing Markdown.
This is what I love about Vim. It's by far my favorite editor even with just basic usage, and I consistently learn new tricks that make it somehow even better.
You can use a dedicated app alongside Vim for that. On macOS, Marked2[1] is pretty great.