梧州市环城高速公路省际通道下潭隧道实现贯通
1,812 questions
113
votes
8
answers
38k
views
How do I debug my vimrc file?
I have a problem in Vim, and I think it may be in my vimrc file (or have been told it could be my vimrc file).
How do I verify this? If it is my vimrc file, how do I know where exactly the problem ...
116
votes
1
answer
33k
views
How to debug a mapping?
I see a lot of questions on here where a user has a mapping which doesn't work
and most of the time the reasons are pretty similar.
I suggest making this question a reference for these questions, to ...
517
votes
15
answers
723k
views
How can I copy text to the system clipboard from Vim?
Is there a way to copy a block of text to the system clipboard, so I can paste it in another program?
138
votes
3
answers
22k
views
How do I navigate to topics in Vim's documentation?
In Vim's built-in help system, how do I…
search for topics that I want help on?
follow hyperlinks?
browse around for related material?
12
votes
1
answer
3k
views
How do I use a variable or return value in option, command, or mapping?
I have a variable foo with let foo='value', and a function F like
function F()
return 'value'
endfunction
and I want to use them
in an option: :set option=foo, :set option=F(); or
in a command: :...
319
votes
10
answers
187k
views
What are the differences between the Vim plugin managers?
I have been looking at the different package managers for Vim, and the one I decided to use is vim-plug.
However, I have seen others like pathogen and vundle, and I honestly don't know what the ...
86
votes
8
answers
104k
views
How to map Alt key?
I'm trying to map Alt key in the following way:
:map <A-j> j
:map <A-k> k
but it doesn't work (bell is rang on Alt + j/Alt + k).
What am I missing?
I'm using Terminal on OSX, the same ...
52
votes
5
answers
33k
views
What is the difference between the Vim snippets plugins?
There is a great number of snippets plugins for Vim: ultisnips, snipmate, xptemplate, neosnippet and a lot more.
They all have pros and cons and more or less dependencies. So far I've been using ...
29
votes
1
answer
8k
views
Can I map a Ctrl + upper-case letter separately from Ctrl + lower-case letter?
I am trying to figure out how to navigate windows little quicker, so I would like to map the following:
:nmap <silent> <C-F> :wincmd f<CR>
The problem is this remaps the ^f (lower-...
16
votes
1
answer
6k
views
Mapping Ctrl with equal sign
I am trying to map my Ctrl and plus sign together. This is what I am trying in my vimrc:
nnoremap <C-=> : echo "Hello" <CR>
However it seems like the mapping is not being triggered.
...
145
votes
7
answers
198k
views
How do I install a plugin in Vim?
How do I install a plugin in Vim?
Does it matter:
Whether I use vi or Vim?
Whether I use gVim?
Which version of Vim I'm using?
What my OS is?
28
votes
1
answer
4k
views
Disable <Esc> but keep <C-[>
For switching back from Insert mode I'm used to <Esc>. Now I'm looking to retrain myself to <C-[> instead of <Esc>. For that i need to disable <Esc> to help with the ...
78
votes
3
answers
36k
views
Why should I use augroup?
I understand how auto commands work, and how to use them, but I'm somewhat unsure of what augroup is for. I read in :help augroup
*:aug* *:augroup*
:...
30
votes
4
answers
35k
views
Multiple cursors at desired location
I'm using vim-multiple-cursors plugin.
I would like to put cursors exactly where I want. For example ([x] are the cursor positions):
Lorem ipsum dolor sit amet[1], consectetur adipiscing elit,
sed ...
45
votes
4
answers
18k
views
How can I change the default indentation based on filetype?
I'd like to have different indentations based on the type of file I am working on. For example, working on a .c file I'd like my indentation be 4 spaces. In .html files I'd like to (have to) work with ...