dotfiles/.vim/user_tips.vim

52 lines
2.3 KiB
VimL
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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 #',
\ 'packadd cfilter',
\ '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',
\ '`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'
\ ]