aboutsummaryrefslogtreecommitdiff
path: root/runtime/doc/tips.txt
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/doc/tips.txt')
-rw-r--r--runtime/doc/tips.txt36
1 files changed, 24 insertions, 12 deletions
diff --git a/runtime/doc/tips.txt b/runtime/doc/tips.txt
index 5d5e89da77..88528b0e4e 100644
--- a/runtime/doc/tips.txt
+++ b/runtime/doc/tips.txt
@@ -47,7 +47,7 @@ is an overview with tags to jump to:
|gf| Go to file name under the cursor.
-|%| Go to matching (), {}, [], /* */, #if, #else, #endif.
+|%| Go to matching (), {}, [], `/* */`, #if, #else, #endif.
|[/| Go to previous start of comment.
|]/| Go to next end of comment.
|[#| Go back to unclosed #if, #ifdef, or #else.
@@ -59,8 +59,8 @@ is an overview with tags to jump to:
|v_ab| Select "a block" from "[(" to "])", including braces
|v_ib| Select "inner block" from "[(" to "])"
-|v_aB| Select "a block" from "[{" to "]}", including brackets
-|v_iB| Select "inner block" from "[{" to "]}"
+|v_aB| Select "a block" from `[{` to `]}`, including brackets
+|v_iB| Select "inner block" from `[{` to `]}`
==============================================================================
Finding where identifiers are used *ident-search*
@@ -196,7 +196,7 @@ charset.c
digraph.c
...
-and I want to rename *.c *.bla. I'd do it like this: >
+and I want to rename `*.c` `*.bla`. I'd do it like this: >
$ vim
:r !ls *.c
@@ -346,14 +346,26 @@ comma-separated list of extension(s) you find yourself wanting to edit: >
" vim -b : edit binary using xxd-format!
augroup Binary
- au!
- au BufReadPre *.bin let &bin=1
- au BufReadPost *.bin if &bin | %!xxd
- au BufReadPost *.bin set ft=xxd | endif
- au BufWritePre *.bin if &bin | %!xxd -r
- au BufWritePre *.bin endif
- au BufWritePost *.bin if &bin | %!xxd
- au BufWritePost *.bin set nomod | endif
+ autocmd!
+ autocmd BufReadPre *.bin set binary
+ autocmd BufReadPost *.bin
+ \ if &binary
+ \ | execute "silent %!xxd -c 32"
+ \ | set filetype=xxd
+ \ | redraw
+ \ | endif
+ autocmd BufWritePre *.bin
+ \ if &binary
+ \ | let s:view = winsaveview()
+ \ | execute "silent %!xxd -r -c 32"
+ \ | endif
+ autocmd BufWritePost *.bin
+ \ if &binary
+ \ | execute "silent %!xxd -c 32"
+ \ | set nomodified
+ \ | call winrestview(s:view)
+ \ | redraw
+ \ | endif
augroup END
==============================================================================