Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
1
vote
Accepted
Get <Leader> value as <Space> and not ' '
You can simply use substitute():
substitute(get(g:,"mapleader","\\"), ' ', '<Space>', '')
Since there is only one case where get(g:,"mapleader","\\") will return a single whitespace this should wor …
21
votes
Accepted
vimscript: how to repeat a string N times?
To repeat a string you want to use the (appropriately named) function repeat()
The doc is here :h repeat()
And you can use it like that:
let foo = repeat("abc", 3)
3
votes
How to concatenate two registers?
Let's say you want to merge "a and "b into "c:
call setreg('c', getreg('a').getreg('b'))
You can of course replace a, b and c by whatever register you want.
For a bit more of details:
getreg('x …