Linked Questions

2
votes
1answer
2k views

What does <C-@> do? [duplicate]

I have seen CTRL@ being used in Insert Mode in a VimGolf challenge. In this scenario it inserts the text that was last typed and switches to Normal Mode. However, I wonder if this is the real purpose ...
1
vote
1answer
36 views

How to search for documentation on an option which is also a vim command argument? [duplicate]

When a Vim option is also a Vim command argument, :help opens the command argument help page. How can I direct :help to get the option page? For example, trying :help verbose opens the -V verbose ...
0
votes
0answers
21 views

Vim what the :c command do? [duplicate]

On vim I enter for a mistake the :c And I can exit only with ctrl+c What the command :c do?
134
votes
2answers
244k views

How can I use Vim as a hex editor? [duplicate]

Is there a neat way I can view binary files as hex in Vim, and save it back to binary from the hex?
59
votes
6answers
92k views

How can I change the font size in gVim?

Is there a way to change the size of the font in gVim, using native commands? And if not, what script can be used to do it quickly?
19
votes
5answers
9k views

How to find out what a key is mapped to?

I know that running :map commands without arguments should give me a list of user-defined mappings, but, for example, when I press Ctrl-W Ctrl-I something happens, yet I have no idea what function was ...
17
votes
2answers
6k views

How to tell vim not to try to unzip a file

I'm trying to open an .xlsx file in Vim, but got an error saying: ***error*** (zip#Browse) unzip not available on your system I know it's a binary file, but I want to do some checksums and ...
15
votes
1answer
35k views

What are the .viminfo and .netrwhist files?

I was wondering what's the purpose of .viminfo and .netrwhist files?
6
votes
2answers
1k views

What does <Plug> do in vim?

I came across <Plug> in this command of easy-motion nmap <Leader>w <Plug>(easymotion-overwin-w) I tried to search for the definition of but no luck. What does it mean? Does it have ...
9
votes
2answers
2k views

Manipulate chars with their ascii code

Let say I have let l:letter = 'A' is there a function that takes l:letter ascii code and transforms it to 'B'? I mean something like let l:next_letter = l:letter + 1 I know there's <Ctrl-A> ...
7
votes
1answer
5k views

Understanding the line() built-in function

I'm reading vim help about the line function and here is an example I found: :let failed = append(line('$'), "# THE END") In my vimrc I also found line('.'). The documentation says: line( {expr}) ...
8
votes
2answers
270 views

What does [count]% do?

I would expect [count]% to jump back and forth between matching braces count times or something like that, but instead, typing that command seems to move the cursor to a random place in the buffer. ...
1
vote
1answer
3k views

What is the vimscript version of sprintf?

I'm trying to create a dynamic line to execute, currently I have execute a:modes[i] .'noremap <silent> <buffer> '. l:key .' <Esc>:call HardModeEcho(g:HardMode_hardmodeMsg)<CR>...
1
vote
2answers
688 views

vimscript: get result of cmdline-completion Ctrl-a

Need a function that, returns a string, which is result of cmdline-completion Ctrl-a, i.e., a list of words seperated by space. given an input string of partial ex-command. For example, given :h ...
6
votes
1answer
174 views

What does “tag” mean in the context of Vim's help window?

I ran :help index to find out about key mappings and it's great, but there's one thing I don't get. At the top it says... This file contains a list of all commands for each mode, with a tag and a ...
2
votes
1answer
1k views

How to get info on set cc=number?

set cc=10 The simple command for vim version greater than 7.3 can create a red line from top till bottom on the 10th column. I want to get more info about "set cc=number" such as 'can make the line ...
0
votes
1answer
786 views

What is the difference between normal mode and command mode in vim?

I know that normal mode and command mode is same thing but tells different. I found this in http://vim.wikia.com/wiki/Mapping_keys_in_Vim_-Tutorial(Part_1)
3
votes
2answers
115 views

On string concatenation, what's the difference between . and .. (single dot and double dot)?

From the :execute help (:h :exe): *:exe* *:execute* :exe[cute] {expr1} .. Executes the string that results from the evaluation of {expr1} as an Ex command. ...
-1
votes
2answers
394 views

Good Ways to Get Over that Vim Learning Curve? [closed]

I've done vimtutor several times when I get bored. I love the idea of Vim. It's keyboard shortcuts have a lot of relevancy to me and I just feel like there's a lot available to me, that wasn't ...
2
votes
1answer
286 views

How to change where Vim will read .vimrc file?

I'm re-learning Vim, and now I'm building my own ~/.vim/.vimrc file. Yes, it is store under the .vim/ folder, which is created by MacOSX after I updated to Big Sur. What I want is simply this set ...
1
vote
1answer
208 views

Character class to match “iskeyword” characters

In short: how do I define a regex that matches 'iskeyword'. My initial thought was that match(str, '\w*') would match an arbitrary number of keyword characters in str, but it really only matches to a ...
0
votes
3answers
51 views

How to filter without destroying original list?

I have a list of strings which is interesting in its own right, but I also want a filtered version of it for other purposes. But I discovered to my horror that filter, in addition to returning a ...
1
vote
2answers
230 views

Neovim - Map selectively only on a terminal window

I like the terminal in neovim. I am accustomed to tmux and tmux's copy-mode, and type q to exit copy-mode to return back to regular-interactive-mode. Now, in neovim, when in NORMAL mode (which is akin ...
0
votes
1answer
357 views

g! vs v in vim command

Is there any difference between doing the following two commands: :1,19g!/let/d And: :1,19v/let/d Or is v an alias for g! ?
2
votes
1answer
102 views

What is the difference between ^ and _ for cursor movement

They both seem to move the cursor to the first non-blank character of the current line and I wonder what was the reason for duplicating this functionality
1
vote
1answer
188 views

Error detected during LaTeX-Suite-aka-Vim-LaTeX plugin update with Vundle

When updating vundle-managed plugins with: :PluginUpdate in buffer, I get the following error message: Error detected while processing ~/.vim/bundle/LaTeX-Suite-aka-Vim-LaTeX/plugin/remoteOpen.vim: ...
1
vote
1answer
174 views

Usage of t. and | in vim command

I've assembled the following command to take a markdown file and add a ==== under each line that starts with a #: :g/^#/t. | s/./=/g How exactly does this work? As far as I understand: :g/ start a ...
1
vote
1answer
100 views

vim input function with default value

I'm working a function to rename the visual selected text function! Rename() name = getline("'<")[getpos("'<")[2]-1:getpos("'>")[2]-1] let newname = input('rename the selection with: ...
0
votes
1answer
93 views

How to multi select for the purpose of copy operation?

I can do a search to highlight multiple unrelated words that exist with: /word1\|word2\|word3 But this is only search, it is not "select" (for copy and paste operation) How to highlight ...
1
vote
2answers
55 views

Replace “ … ” strings of various length with strings that all end at same column but start at different columns for each row

I have the following text Plan based ................................. 32 Iron based in Compound .............................. 34 Gallium Arsnide based III-V ............ 36 ... Indium ...

15 30 50 per page