5 ms·
Vim is still one of the best IDEs out there, and I do mean IDE. I have git, gdb, terminal, and LSP integration. I've got spell check. I've got tags, cscope, sni
by ilovecaching 5y ago
Vim is still one of the best IDEs out there, and I do mean IDE. I have git, gdb, terminal, and LSP integration. I've got spell check. I've got tags, cscope, snippets, and lint warnings. I've got documentation and hover support. On top of that, my editor uses megabytes instead of gigabytes of RAM, and I can run it from any terminal, on any computer. I can run it on my iPad Pro using blink. I can run it over mosh or ssh. I've been able to use it at every job I've ever worked at even as workplaces have switched from Sublime to Atom to VS Code. It doesn't cost me a dime to use it. I've been writing C, Go, Rust while working on bootloaders, kernel patches, and firmware for years and years and Vim has been a powerful tool to keep me as productive as possible. Even after trying CLion, VSCode, Atom, etc. I always come back to Vim realizing that these sluggish GUI Java/Javascript apps simply don't offer enough to compare to the decades of work that has gone into Vim.
Vim and Emacs are an investment, but the investment pays off ten fold. On top of their powerful features you get to support free and open source software that isn't being steered by corporations that want to keep you locked in and collect as much analytical data on your habits as possible. They aren't looking to lock you into an editor as a service. We've seen with neovim that the system works and has made both vim and neovim even better through healthy competition. Free and open source for the tools you use everyday is the way to go.
- asicsp 5y ago>I have git, gdb, terminal, and LSP integration. I've got spell check. I've got tags, cscope, snippets, and lint warnings. 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.
- mrzool 5y ago> If not pure coding projects, at least for things like markdown, having a preview could help. You can use a dedicated app alongside Vim for that. On macOS, Marked2[1] is pretty great. [1]: https://marked2app.com https://marked2app.com
- epicide 5y agoPersonally, I suggest taking a look at a few "classic" plugins. For starters, anything by Tim Pope. 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.
- ilovecaching 5y agoHere's what I use: 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.
- mfrw 5y ago> 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!
- wastholm 5y ago> If not pure coding projects, at least for things like markdown, having a preview could help. 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. [1] https://vimwiki.github.io/ https://vimwiki.github.io/
- daptaq 5y agoFrom what I know about Vim this isn't unusual. There is a division between those who treat Vim as a constant tool that should be kept as close to the defaults as possible, so that you can work anywhere it is installed (I'd consider this the classical approach inspired by vi), others who value extending and modifying it to match their needs and preferences (this seems to me to lean towards Emacs' spirit). As Vim is both a vi-clone but also has the abilities to be extended, I don't think either is more wrong than the other. My sympathies go towards the former, because Emacs is my Emacs.
- ilovecaching 5y agoYou use emacs with no extra configuration? What kind of code do you write?
- seanw444 5y agoI don't think that's what they meant. I think they meant "I use Vim for lightweight, default editing. When I want to extend my editor precisely to my liking, (like in Emacs), I use Emacs."
- daptaq 5y agoYes, exactly. Emacs core feature is that it is programmable, sticking to default would be like only using hjkl to move in Vim.
- ilovecaching 5y agoAh, I know RMS claims to not using any plugins and barely any customizations since emacs is "exactly how he wants it" as the author. I am curious if there are others who feel the same way.
- AndroidKitKat 5y agoI write C++ and Python for $DAYJOB and I use Emacs with no extra configuration (plugins, evil mode, etc). Out of the box it takes a while to understand its flow (the emacs tutor is excellent), but it's quite usable and nice.
- jamespwilliams 5y agoIn the era of neovim, you can get very far with very few plugins. 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.
- peakaboo 5y agoInstall lightspeed and you will be amazed.
- hellcow 5y agoI've been using Vim for more than 10 years, and I had no idea about :terminal. I was using tmux instead to get terminals side-by-side but using panes looks super useful too. Thanks! :) 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.
- leephillips 5y agoWell, I don’t think :terminal has been around for 10 years. I believe it appeared with v8.
- sleepycatgirl 5y agoYee, Vim is damn amazing, I love Vim as well, though, I admit, I use Emacs with evil mode :D
- seanw444 5y agoEmacs with Evil is the ultimate beast. Sheer extensibility combined with great modal keybinds = can there ever be anything better?
- renox 5y agoSorry, but I'm not so sure with VSCode I'm nearly instantly productive, with vim I have to spend a lot of time before being able to navigate in C++ files..
- ilovecaching 5y agoC/C++ have been around for a long time and have great support in Vim. You can build a cscope database (cscope -b -q -k) and then use :cs find - - a: Find assignments to this symbol - c: Find functions calling this function - d: Find functions called by this function - e: Find this egrep pattern - f: Find this file - i: Find files #including this file - s: Find this C symbol - t: Find this text string And if you want more you just need a single plugin w0rp/ale and have clangd installed, no configuration needed to get the same LSP support you can get with VSCode. It also has built in makefile and gdb support.
- atarian 5y agoDo you have any experience with using cscope on other languages like Java?
- ilovecaching 5y agoCscope supports C, C++, and Java. It should work the same for all three. You need to build your cscope database, and for Java this will require getting a list of files using find, and then use :cs in vim to load it. I primarily write C and I put the build commands in my Makefiles for ctags and cscope. The Linux kernel also has this feature as well. If you go into the kernel source you can just run `make tags` and `make cscope` and it lets you browse the 100s of millions of lines of kernel source with either.
- lawn 5y agoIn the grand scheme of things, if you program several hours per day the initial setup and learning time is quickly dwarfed.
- rhizome31 5y ago> It doesn't cost me a dime to use it. If you haven't done so already, you're encouraged to donate to ICCF Holland :)
- vlunkr 5y agoLSP integration is a real game changer. I've tried different plugins but coc.nvim is the first to work incredibly well and not trash the performance.