diff options
author | Josh Rahm <joshuarahm@gmail.com> | 2023-11-29 21:52:58 +0000 |
---|---|---|
committer | Josh Rahm <joshuarahm@gmail.com> | 2023-11-29 21:52:58 +0000 |
commit | 931bffbda3668ddc609fc1da8f9eb576b170aa52 (patch) | |
tree | d8c1843a95da5ea0bb4acc09f7e37843d9995c86 /runtime/doc/tips.txt | |
parent | 142d9041391780ac15b89886a54015fdc5c73995 (diff) | |
parent | 4a8bf24ac690004aedf5540fa440e788459e5e34 (diff) | |
download | rneovim-userreg.tar.gz rneovim-userreg.tar.bz2 rneovim-userreg.zip |
Merge remote-tracking branch 'upstream/master' into userreguserreg
Diffstat (limited to 'runtime/doc/tips.txt')
-rw-r--r-- | runtime/doc/tips.txt | 36 |
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 ============================================================================== |