Live data from Hacker News

Vim plugins I use

prakashdanish.github.io

31–40 of 93 posts

Re: Vim plugins I use

#31
post #25
post #7

As an Emacs user, I'm so curious about vim packages. Does vim have packages that are akin to adding a major mode in Emacs? Some of the packages on this list look like the vim version of minor modes or little helper functions.

Vim has a limited number of "modes" -- insert, normal, command and visual. These are not analogous to Emacs modes AFAICT. A vim package/plugin typically modifies/enhances behaviour in these modes. Where they can, useful operations are bound to a key combination. You spend most of your time in Vim (when editing) in normal mode, executing deft movements and register usage to behave as a surgeon upon the text, as it wer…

Right, I am an evil user myself. My question was about the vim equivalent of major modes in Emacs --- Does vim have a concept of major mode (a set of language specific functionality, one major mode per buffer)?

Re: Vim plugins I use

#32
post #21

I gave up trying to make Vim into an IDE. It's a text editor. It's an excellent one, but that's what it does. The plugins just aren't very good. NerdTree is not a good file browser. None of the autocomplete/intellisense works very well. It does work, but requires a lot of setup, and let's be honest, a TUI isn't the best way to interact with autocomplete dropdowns. Most of the IDEs have vim like features or plugins. I…

Vim for me is an editing style. It's more powerful than using arrow keys/alt/ctrl for navigation. Wherever I edit, I just need that editing style.

The vim editor gives you only the editing style. VS Code on the other hand gives you that editing style (arguably less powerful, but good enough for my needs) plus a whole lot of other things without much configuration. I'd choose VS Code anyday

Re: Vim plugins I use

#33
post #26
post #21

I gave up trying to make Vim into an IDE. It's a text editor. It's an excellent one, but that's what it does. The plugins just aren't very good. NerdTree is not a good file browser. None of the autocomplete/intellisense works very well. It does work, but requires a lot of setup, and let's be honest, a TUI isn't the best way to interact with autocomplete dropdowns. Most of the IDEs have vim like features or plugins. I…

I've tried using vim plugins with different editors before, but they're always missing a few of the shortcuts that are in my muscle memory and drive me crazy. Also, being able to ssh into any machine and remotely edit code is pretty awesome.

The biggest thing for me when trying to switch from console vim is `alt + ` will send ESC and the key, so you can use alt to exit insert mode and send a command at the same time. Doing alt+j or alt+k has become the way I always leave insert mode (or command, or visual).

Unfortunately most IDEs that have vim keybindings don't support this, and it has become such a baked in part of my muscle memory that it makes switching to anything else such a pain.

Re: Vim plugins I use

#34
post #7

As an Emacs user, I'm so curious about vim packages. Does vim have packages that are akin to adding a major mode in Emacs? Some of the packages on this list look like the vim version of minor modes or little helper functions.

[deleted]

Re: Vim plugins I use

#36
People seem to swear by NerdTree, but I personally don't see the purpose of it. Sure it may be nice to see your file structure sometimes, but having a terminal open or even just the actual folder window open solves that. Everything else can be done with the built-in :Ex command, which lets you navigate to open files, create new files, rename, delete, mostly everything you want.

As for other plug-ins, there are a few I would recommend (can you tell I'm a Tim Pope fan?):

- vim-commentary: Gives bindings for commenting out code quickly: https://github.com/tpope/vim-commentary

- vim-surround: Easily surround selected text with symbols: https://github.com/tpope/vim-surround - vim-unimpared: Adds bindings for some misc. commands, like enabling relative line numbers and spellcheck: https://github.com/tpope/vim-unimpaired

- vim-repeat: Allows many more commands to be repeated with . : https://github.com/tpope/vim-repeat

- VimCompletesMe: A much more bare-bones auto-completion tool than YouCompleteMe, hitting tab gives you matches from your previously typed text. It's also all in vimscript so it's much easier to install and manage: https://github.com/ajh17/VimCompletesMe

- Pathogen: A plug-in manager, if you can call it that. It simply re-adjusts the file paths so you can centralize your plugin directory. Some plug-in managers will auto-update, but I never liked that, just run git pull if you wish to update a plugin: https://github.com/tpope/vim-pathogen

There are some other cosmetic ones I like as well, like airline, and vim-highlightyank, but that's a personal preference.

Re: Vim plugins I use

#37

This list is far from conservative. Vim isn't an IDE and shouldn't be made into one - effective vim users ^z out of vim and use Unix as their IDE. Here's my more conservative plugin list: https://git.sr.ht/~sircmpwn/dotfiles/tree/.vimrc fugitive: I use this for the sole purpose of :Gblame because the command line blame tool that ships with git is frustrating to use. ctrlp is there for opening files quickly in large c…

There are a few good gems here that I'm definitely stealing. Thanks for sharing!

Re: Vim plugins I use

#38
post #10

How is the plugin management in vim? I use emacs and it’s a pain to setup. You need to modify a config file (.emacs) in order to add plugin lists (melpa). You then browse the list through a shortcut (M-x list-packages) and you only see names, no description or ways to look for something specific. Once you installed your plugins there are no real way to access a manual or learn them. Often you will need to modify conf…

I use the default package functionality of Vim 8.x (see :h package).

I create a ".vim\pack\foo\start\" folder and git clone plugins there.

Invoking ":helptags .vim\pack\foo\start\somenewplugin\docs" for a plugin makes the docs available to the :h and :helpgrep commands.

Re: Vim plugins I use

#39

This list is far from conservative. Vim isn't an IDE and shouldn't be made into one - effective vim users ^z out of vim and use Unix as their IDE. Here's my more conservative plugin list: https://git.sr.ht/~sircmpwn/dotfiles/tree/.vimrc fugitive: I use this for the sole purpose of :Gblame because the command line blame tool that ships with git is frustrating to use. ctrlp is there for opening files quickly in large c…

I don't see why being effective in vim means you ^z out of vim to run `ack` or `grep`, instead of pressing ^f (for example) to run Ack.vim on the and have the results displayed next to your code in a window that, when you select the item you want, opens that corresponding file in a buffer with your cursor already on the line in question. Certainly you don't need ack.vim, you could just ^z and do it the old fashioned way, but where is the utility in that?

As for the unix philosophy, it's all about programs doing one thing and doing it well... but isn't it also about composing those programs to do the job you need done? If you're just ^z'ing out of vim to run `grep` or `ack`, how do you get those results back into vim? copy/paste it through your terminal emulator, using tmux in the best case scenario? How is that more in line with the unix philosophy than simply having vim shell out to those utilities for you?

^z to run unix utilities is like coping the output of one command into a file on disk before sending it to another, instead of simply piping the output of one into the input of another using the functionality of your shell. If vim filling in for a shell violates the philosophy, then damn the philosophy. I'd rather have "the traditional shell+domain specific shells(vim, ranger, etc)" than turn the traditional shell into a one-size-fits-poorly shell.

https://github.com/mileszs/ack.vim (Because ack.vim and plugins like it are actually in keeping with the so-called unix philosophy for reasons I outlined above, you don't actually have to use `ack` with ack.vim. I use it with `ag` (the silver searcher) instead.)

Re: Vim plugins I use

#40
post #10

How is the plugin management in vim? I use emacs and it’s a pain to setup. You need to modify a config file (.emacs) in order to add plugin lists (melpa). You then browse the list through a shortcut (M-x list-packages) and you only see names, no description or ways to look for something specific. Once you installed your plugins there are no real way to access a manual or learn them. Often you will need to modify conf…

Nearly all vim plugins worth a damn come with documentation that integrates smoothly into vim's help system. That vim plugin developers care enough to write such documentation is a credit to vim's plugin culture.
Post reply on HN