dotfiles/.vim/user_tips.vim

55 lines
2.4 KiB
VimL
Raw Permalink Normal View History

2024-02-19 16:07:53 +01:00
let g:user_tips_list= [
\ ':vebose ★ * … ★: eg. map/set/…',
\ ':clist+:cc :+cc :-cc :copen :cwindow :cclose',
\ ':undolist :earlier :later',
\ 'git mergetool → vimdiff3 → https://stackoverflow.com/a/163659',
\ ':llist+:ll :+ll :-ll :lopen :lwindow :lclose',
\ ':m ''>+1 … :m ''<-2',
\ 'QuickList → :set ma+edit+;w ;s … ;q',
\ ':set foldopen-=search',
\ 'Buffer info → <c-g> g<c-g> … :map <buffer><tab>',
\ 'Rename file → :saveas * | :silent !rm # | :bw #',
2024-08-01 16:45:19 +02:00
\ 'packadd cfilter justify',
2024-02-19 16:07:53 +01:00
\ 'Next word location → ]I [I ]<c-I> [<c-I> … <leader>]I <leader>[I',
\ ':w !sudo tee > /dev/null %',
\ 'v`]o`[ visual last change — https://www.reddit.com/r/vim/comments/ypt6uf/comment/ivl68xu/?utm_source=share&utm_medium=web2x&context=3',
2024-08-01 16:45:19 +02:00
\ ':exec ''argdo bw'' | %argdelete',
\ 'changes g, g; || jumps ^i ^o || marks g`…',
\ 'set foldmethod=marker/indent foldlevel=i foldnestmax=j',
2024-02-19 16:07:53 +01:00
\ '`0·`"·`.·`` … last exit·edit·change·pre-jump … also g''*',
\ 'q: q? q/ … @: ?<cr> /<cr> :&<cr> , ;',
\ '<c-n><c-p> <c-x><c-l> <c-x><c-f> … :h ins-completion',
\ ':split +N … open cur. file in N line … :split +/pattern',
\ 'vim can edit zip files',
\ ':set nowrapscan (cycle search)',
\ '<c-x>= <c-v>',
\ 'silent! %s/[\\r \\t]\+$//',
\ ':ilist pattern … :ijump pattern',
\ 'Replace mode → R',
\ 'J gJ K gwip g~ ~',
\ 'Folds → zm za zi zj zk (zfG/zd) zc zC zo zO … :*fold<tab>',
\ '<c-]> (`ž`) <c-t>',
\ 'Macro defs. → ]D [D ]<c-D> [<c-D> … :dlist string … :djump string',
\ ':update | edit ++ff=dos | setlocal ff=unix',
\ 'Shift-V and then type gq → put "overflowed" text on new lines',
\ ':set scrollbind (`scb`) … :diffthis :diffoff :diff*<tab>',
\ ":let i=10 | 'a,'bg/Abc/s/yy/\=i/ |let i=i+1 # convert yy to 10,11,12 etc",
\ 'use \zs \ze \c inside `?`|`/`',
\ 'v_* :%s//replacement',
\ ':5,10norm! @a … :g/pattern/norm! @a',
\ '`textwidth` → n_gq* v_gq',
\ 'File encryption → :X … vim -x filename',
\ ':sort /,/',
\ 'zz zb zt zL zH gm gM',
\ '<c-a> <c-x> g<c-a>…',
\ ':set spell :spell<tab> … z= zg zug ]s [s',
\ ':lhistory :lolder :lnewer',
\ ':[m]ove :[co]py (:t) :p :#',
\ ':help i_CTRL-<tab> … i_CTRL-Y … i<c-u>',
\ '*grep onchange -r . --include=*.\{js,md\} …or http://jdem.cz/fgytv8',
\ '%bdelete|edit #|normal `"',
\ ':diffget :diffput c] [c',
\ ':chistory :colder :cnewer',
\ 'Repeat substitution(s) & g& :& :&& :~ … :help :s_flags'
\ ]