This commit is contained in:
Rico Sta. Cruz 2015-05-30 15:17:54 +08:00
parent 04ab1dabbf
commit 24a84aa7ed
1 changed files with 8 additions and 7 deletions

View File

@ -6,21 +6,22 @@ title: Vimscript snippets
### Inspecting the buffer
getline('.')
line('.') " current line number
col('.')
getline('.') " current line as a string
getline(1)
getline(1, 0)
line('.') " current line number
search("^$") " next blank line
getcurpos() " [bufnum, lnum, col, off, curswant]
getpos('.')
getpos('.') " [bufnum, lnum, col, off]
expand('<cword>') " word under cursor
expand("%") " current file
expand('%') " current file
### Command line
" syntax stack
map(synstack(line('.'), col('.')), 'synIDattr(v:val, "name")')
### Files