#vimwizards — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #vimwizards, aggregated by home.social.
-
SOLUTION: @gumnos came up with the idea of piggy-backing
:nohlonto control-l for refresh:nmap <C-L> :nohl<CR><C-L imap <C-L> <Esc>:nohl<CR><C-L>aHey #vim wizards,
The number one reason I don't use search more freely when editing is that all the highlights triggers my #CDO a little bit, and
:nohlis a little clumsy to type in a hurry.I wanted to map
:nohlto an easy-to-press keybind, like ctrl-/, but I can't seem to get it to work.Any ideas?
" map Ctrl-/ to :nohl nmap <c-Slash> :nohl<CR> imap <c-Slash> <Esc>:nohl<CR>a -
@angrylinus @paul @halibut @evgandr
Doing some digging, and it seems like
truecoloris the correct setting for theCOLORTERMvariable, so I'm back to square one.Hey #VimWizards, any suggestions to fixing a gray background in #NeoVim? This is an odd problem I'm having on a couple very unrelated systems.
-
Hey #VimWizards,
I found a [cool hack] for a focus mode in n?vim, such that only one line is displayed at a time:
:match Conceal /^.*$/ :set conceallevel=3 All the lines except current one will be concealed. If you do not like the 'Conceal' color, :highlight Conceal NONE When you finish, just do :matchYou'll probably have to hit
^Levery now and then, as I found it a bit buggy with word wrap, but it's definitely great for concentrating on a single line at a time (especially when the lines are of very different lengths). -
Hey #VimWizards,
Is there any way to scroll the screen while keeping the cursor fixed to its relative position onscreen?
Regular [jk] will move the cursor (and scroll once you reach the top or bottom of the screen and try to scroll beyond it)
Control+[jk] will move the screen, but keep the cursor locked in its position relative to the text.
I'd like to have the cursor locked in the middle of the screen (or wherever) while scrolling.
Just a random idea, I thought someone might know. ;)
WAIT! I think I found it! haha
:set scrolloff=999 -
Hey #VimWizards,
Is there an easy way to set an option like "cursorline" from the commandline, like
vim -o "set cursorline" file.txt?(I know that's not what
-odoes, at least innvim)UPDATE: The wizards have spoken!
vim -c 'set cursorline' file.txtIn addition, it seems that vim -c 5 is equivalent to vim +5, because it's interpreting '5' as a command (
:5)
I always love going back and reading the part of the manpage that describes the option once I learn it, because then I learn the lingo and understand things just a tiny bit better.
And yeah, I'm 25 years a vim newbie. XD -
#VimWizards, Anyone know a way to support #markdown linking relative to some root directory within #vim? `gf` is going to jump based on my current working directory I think.
-
Hey #VimWizards,
Is there an easier-to-type way to capitalize an entire line than gU$ ?
More characters are fine if they're closer to the home row, or require less shifting ;)