Live data from Hacker News

Vim plugins I use

prakashdanish.github.io

71–80 of 93 posts

Re: Vim plugins I use

#71
post #58
post #26

Earlier quoted context omitted.

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.

Many of them fail to implement macros in my experience. Though I've heard VSCode got this part right. The most productive vim keybinding I ever came across was: noremap @q Since the key to start a macro is q, you can quickly tap qq to record a macro to the q register (end it by pressing q again.) Then by whacking the space bar you can execute the q macro as many times as you'd like. Once you get into the rhythm of us…

Since is some peoples' leader key (not mine, but I see it a lot), just throwing it out there that `Q` is a fine alternative for that mapping too. It's also a nice semantic companion to `qq`! ...unless you are a heavy ex-mode user, of course :)

Re: Vim plugins I use

#72
post #14

Earlier quoted context omitted.

While I appreciate your comment, we can already guess that you believe the packages you have chosen to be “the best” at their job. Without further narration (and I’ve only singled you out due to being the topmost comment), comment sections like this have a tendency to become a dumping ground for vimrc snippets. Could you expand on why? Personally I’d be particularly interested on your thoughts about vim-plug, as I us…

- You can update all the plugins with PlugUpdate; furthermore, they are updated in parallel. - You can lazy load plugins - You can execute commands after a plugin update (e.g. building the new binary for youcompleteme) Those are the major points I think.

Plugin managers are also nice because you can maintain a list of plugins right in your vimrc. Not the biggest win in the world if you are fine managing your plugins via a shell script, but it's a win to many.

My favourite thing about vim-plug is its `:PlugDiff` command which, after running `:PlugUpdate` will load all the new commits in an explorable vim buffer, so you can see exactly what changed and even easily see code changes.

Re: Vim plugins I use

#74
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 gave up too: I wanted to replace Eclipse with gvim but vim doesn't use efficiently multiple tabs by default and it would take a lot of configuration to change this..

Re: Vim plugins I use

#75
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 totally agree that the plugins aren't great. I never was able to leave VIM though. The reason is that it works so well over SSH and I don't like the context switching from VIM to IDE. Also IDE's always end up crashing or lagging at some point. When you're in the coding mindset this can really upset me greatly. What IDE do you use?

I use Visual Studio. It's free now and I've been using it forever, since it's first release.

Re: Vim plugins I use

#76
post #57

Earlier quoted context omitted.

Text editors and IDEs are quite different. For everz we've ben trying to shove one into the other. Every IDE has a sort of shitty text editor. Every text editor tries to make a shitty IDE. Can someone please ackgnowledge that the reality is that neither is a good approach? I wish that I could have complete integration between VIM and JetBrains suite. Would be nice if the JetBrains platform could render a VIM inside i…

This is the goal of the Oni project, but it's still early in development and there's lots of work left to do. Yes, it's electron but in my experience it never uses more than a few hundred MB of ram. https://github.com/onivim/oni

Oni is my current text editor, and even though it's pre-1.0, it's been a fantastic experience. It starts fast, looks great, works perfectly as a Vim (it supports standard Vim plugins), and requires almost no configuration (I don't know why the built-in Prettier code formatting is shipped disabled, but you should turn it on).

Re: Vim plugins I use

#78
hmmm. i dont use any myself (i tried omnisharper and the java equivalent for more quickly finding syntax errors but quickly dropped them as they are unreliable).

here are some plain vim alternatives:

1. goyo: i write markdown quite a bit. it is not necessary to have much for this except perhaps syntax highlighting. hiding the status line can likely be done with a few configuration directives.

2. gitgutter. for the described use case: :new:read !git diff use the search :/ to go from one diff to the next

3. vim-surround

for a word: (wa) for a line: ($a)

depends on the situation, but i'd need more to be sold to use this plugin.

4. vim-autoclose as described here it might possibly be nice except if you have to write a smiley, an arrow, or similar. if you never need to i can see this being useful, but the effect is quite minimal, as going to the end of the current line is a matter of $ and inserting a closing parenthesis after it is a matter of a) .

5. vim-commentary visual block mode is sufficient for this usually. java: (+v)$g$0i//

6. the gruvbox color scheme looks pretty neat. however: the built-in desert scheme works well on almost every machine and is included by default, so there is no real need to go to this amount of trouble. if you work regularly under a shared root account via ssh, i think it is wise to stay away from custom color schemes.

7. could be useful actually, i might try it. however find and grep and other external tools can be used from vim as well. the only gain by using this is that results appear as you type instead of after. marginal gains.

:new:read !find -name 'bla' 8. i think the preinstalled netrw plugin is just fine for exploring. it can be configured to run in a treemode too with some configuration. and the advatage is that it will be available on your average shared server account as well, so it pays much more dividend to learn netrw over nerdtree.

9. sounds like a simple remapping. you could just use the default key +p . the nice thing is that this will be available on shared servers.

10. importing is pretty easy already. here is how i do it. importing 1giim whatever dropping /import\ what*dd

Re: Vim plugins I use

#79
post #73

Is there anything for Vim that mimics the Syntax formatting of Source Insight ( https://www.sourceinsight.com/doc/v4/userguide/Manual/Concep... )? I'd love to switch to Vim...

that would require actually understanding the code. it could be done i guess these days with the async that came in 8.0 but would require some pretty heavy vimscripting.

Re: Vim plugins I use

#80

hmmm. i dont use any myself (i tried omnisharper and the java equivalent for more quickly finding syntax errors but quickly dropped them as they are unreliable). here are some plain vim alternatives: 1. goyo: i write markdown quite a bit. it is not necessary to have much for this except perhaps syntax highlighting. hiding the status line can likely be done with a few configuration directives. 2. gitgutter. for the de…

> 6... the built-in desert scheme works well on almost every machine ...

Agreed.

For a bit of an optimization to that:

- https://github.com/rainux/vim-desert-warm-256

Not many stars on it, but works on a few machines without needing to have extra stuff installed.

Post reply on HN