Live data from Hacker News

Vim After 11 Years

statico.github.com

41–50 of 254 posts

Re: Vim After 11 Years

#41
post #39

The author mentioned CtrlP for fuzzy filename matching. Its great because it's in pure Vimscript, but in my experience it becomes unusably slow for moderately sized projects. A month or two ago, I switched back to CommandT (requires Vim to be compiled with Ruby support, engine written in C) and haven't thought twice about it since then.

I've been meaning to try out matcher[0] for usage with CtrlP, I'm not sure how well it works but it's written in C and is purported to speed up search. Not sure if it's still being maintained, however...

[0] https://github.com/burke/matcher

Re: Vim After 11 Years

#42
I'm not sure why the author advocates job control (ie ctrl-z/fg/bg) instead of using tmux/screen. A multiplexer offers far more flexibility, and most importantly does not lose state even if your session ends (eg ssh connection drops).

Re: Vim After 11 Years

#44
Can vim do the following?

I'm editing some project with 10000 C++ files.

There is some C++ file I currently don't have open, say "palette.cpp" which is in a subdirectory "project/graphics/algorithms/color/".

Now I want to open palette.cpp without ever having to type, not even with tab autocompletion, that path.

IntelliJ (which I do use for C++ ;)) can do this easily: just press CTRL+R, then palette.cpp, ENTER, and there you are in that file.

Another thing: Some IDE's and editors have this feature where if you change lines, it marks it with some color on the left, as well as colors in the scrollbar, to immediately see which parts of the file were changed compared to git and/or the last time you opened it. Can Vim do this?

Thanks!

Re: Vim After 11 Years

#45
post #9

Why do people keep suggesting iTerm2? The built-in terminal app on the Mac does Unicode and 256 colors just fine.

iTerm2 has an absolutely amazing history playback, amongst other nice features.

Re: Vim After 11 Years

#46

One of Vim’s strengths is that it starts lightning fast, so starting Vim from the terminal is trivial. With a modern, 256-color terminal like iTerm2 or Gnome Terminal, it will even look like gVim. But the best part is that you can drop into the command line at any time with Ctrl-Z, which suspends Vim, and your working directory is where you left off. Is there any reason to do this instead of !sh within Vim to drop in…

have your terminal map Ctrl-Z to fg, and you can cycle in and out of the shell almost instantly from vim with that key.

As in Ctrl-z to background, and Ctrl-Z to fg back into vim from the shell?

Re: Vim After 11 Years

#47

> Emacs has a useful mode which highlights hexidecimal colors in CSS and SASS with the color represented by the text. http://www.vim.org/scripts/script.php?script_id=2937 > The biggest hole, however, is the lack of refactoring and smart completion. http://eclim.org/

Thanks for the CSS script link!

Re: Vim After 11 Years

#48

Can vim do the following? I'm editing some project with 10000 C++ files. There is some C++ file I currently don't have open, say "palette.cpp" which is in a subdirectory "project/graphics/algorithms/color/". Now I want to open palette.cpp without ever having to type, not even with tab autocompletion, that path. IntelliJ (which I do use for C++ ;)) can do this easily: just press CTRL+R, then palette.cpp, ENTER, and th…

The CtrlP plugin will make opening these files a breeze. If you just trigger it and type palette.cpp, it should be the first match.

Re: Vim After 11 Years

#49

Can vim do the following? I'm editing some project with 10000 C++ files. There is some C++ file I currently don't have open, say "palette.cpp" which is in a subdirectory "project/graphics/algorithms/color/". Now I want to open palette.cpp without ever having to type, not even with tab autocompletion, that path. IntelliJ (which I do use for C++ ;)) can do this easily: just press CTRL+R, then palette.cpp, ENTER, and th…

It seems "find" will do you what you need. Source: http://stackoverflow.com/a/3407288

Not sure if this helps but FuzzyFinder: http://www.vim.org/scripts/script.php?script_id=1984

Source: http://stackoverflow.com/a/573097

Re: Vim After 11 Years

#50

Can vim do the following? I'm editing some project with 10000 C++ files. There is some C++ file I currently don't have open, say "palette.cpp" which is in a subdirectory "project/graphics/algorithms/color/". Now I want to open palette.cpp without ever having to type, not even with tab autocompletion, that path. IntelliJ (which I do use for C++ ;)) can do this easily: just press CTRL+R, then palette.cpp, ENTER, and th…

1. It is done like this:

    :e **/palette.cpp
2. You can try http://www.vim.org/scripts/script.php?script_id=3052 but I'm positive there are other implementations.
Post reply on HN