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…
Vim After 11 Years
101–110 of 254 posts
Re: Vim After 11 Years
#102Earlier quoted context omitted.
I have space mapped to execute the macro in 'q': noremap @q This lets me set a macro by first wacking qq, then q to finish, and then replay it by wacking space. I find myself using quick throw-away macros that only have a use for maybe 10 seconds far more often with this setup. (Plus wailing on the spacebar to get work done can be really satisfying ;)
This ain't bad but you know you can re-execute last macro with @@? So it ends up being @q and then hold down the @ key to repeat.
Re: Vim After 11 Years
#103It's 'real' intellisense for Vim/C#. It's fairly new and rough around the edges, but works great once you get it going.
Re: Vim After 11 Years
#104Re: Vim After 11 Years
#105Earlier quoted context omitted.
Here are few things how I use it: - scrolling with a mouse wheel - selecting/resizing a split window - jumping to a specific place in the code - making a selection
All of that can be done much more efficiently without the mouse: - scrolling with a mouse wheel :h scroll.txt - selecting/resizing a split window :h window-resize :h window-move-cursor - jumping to a specific place in the code /foo or the myriad of cool things in :h motion.txt - making a selection v{motion}
"narrower window
map - >
"shorter window
map _ -
"taller window
map = +Re: Vim After 11 Years
#106Would save me from buying Sublime
Re: Vim After 11 Years
#107Can 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.
^o and ^i get used a lot in conjunction with 'gf', and are also pretty handy in general.
Re: Vim After 11 Years
#108Some small vim tweaks I've recently been using myself that I find very nice: nmap :write cabbrev w nope Re-map enter to save the file. If you try to do a :w it will yell at you until you take out the cabbrev so you can retrain your muscle memory. Took me about a day to retrain. let g:EasyMotion_leader_key = ';' nmap s ;w nmap S ;b Remap s and S to be easymotion forward and backward. I never use s, since it's largely…
Re: Vim After 11 Years
#109" Make Y behave like other capitals
nnoremap Y y$
" Reselect visual block after indent/outdent
vnoremap vnoremap > >gv
Re: Vim After 11 Years
#110Some small vim tweaks I've recently been using myself that I find very nice: nmap :write cabbrev w nope Re-map enter to save the file. If you try to do a :w it will yell at you until you take out the cabbrev so you can retrain your muscle memory. Took me about a day to retrain. let g:EasyMotion_leader_key = ';' nmap s ;w nmap S ;b Remap s and S to be easymotion forward and backward. I never use s, since it's largely…
" space toggles the fold state under the cursor.
nnoremap :exe 'normal! za'.(foldlevel('.')?'':'l')
" space expands with zO
map zO