Update vim
This commit is contained in:
parent
553ec5208b
commit
ed29edbb53
18
vimscript.md
18
vimscript.md
|
@ -257,25 +257,27 @@ Vim-isms
|
||||||
### Execute a command
|
### Execute a command
|
||||||
Runs an ex command you typically run with `:`
|
Runs an ex command you typically run with `:`
|
||||||
|
|
||||||
|
```vim
|
||||||
execute "vsplit"
|
execute "vsplit"
|
||||||
execute "e " . fnameescape(filename)
|
execute "e " . fnameescape(filename)
|
||||||
|
```
|
||||||
|
|
||||||
### Echo
|
### Echo
|
||||||
|
|
||||||
```
|
```vim
|
||||||
echohl WarningMsg | echomsg "=> " . a:msg | echohl None
|
echohl WarningMsg | echomsg "=> " . a:msg | echohl None
|
||||||
```
|
```
|
||||||
|
|
||||||
### Propmts
|
### Prompts
|
||||||
|
|
||||||
```
|
```vim
|
||||||
let result = confirm("Sure?")
|
let result = confirm("Sure?")
|
||||||
execute "confirm q"
|
execute "confirm q"
|
||||||
```
|
```
|
||||||
|
|
||||||
### Built-ins
|
### Built-ins
|
||||||
|
|
||||||
```
|
```vim
|
||||||
has("feature") " :h feature-list
|
has("feature") " :h feature-list
|
||||||
executable("python")
|
executable("python")
|
||||||
globpath(&rtp, "syntax/c.vim")
|
globpath(&rtp, "syntax/c.vim")
|
||||||
|
@ -290,15 +292,13 @@ exists("g:...")
|
||||||
Mapping
|
Mapping
|
||||||
-------
|
-------
|
||||||
|
|
||||||
```
|
```vim
|
||||||
nnoremap
|
nnoremap
|
||||||
vmap
|
vmap
|
||||||
...
|
...
|
||||||
```
|
```
|
||||||
|
|
||||||
Components:
|
```vim
|
||||||
|
|
||||||
```
|
|
||||||
[nvixso](nore)map
|
[nvixso](nore)map
|
||||||
^ ^
|
^ ^
|
||||||
| don't recurse
|
| don't recurse
|
||||||
|
@ -373,7 +373,7 @@ hi def link markdownH1 htmlH1
|
||||||
|
|
||||||
### Include guards
|
### Include guards
|
||||||
|
|
||||||
```
|
```vim
|
||||||
if exists('g:loaded_myplugin')
|
if exists('g:loaded_myplugin')
|
||||||
finish
|
finish
|
||||||
endif
|
endif
|
||||||
|
|
Loading…
Reference in New Issue