wiki/_next/data/Ie9t5zutrXP6Of75Cb5xF/editor.vim.json
2022-07-29 15:41:17 +00:00

1 line
11 KiB
JSON

{"pageProps":{"metadata":{"date":"\"2021-06-06 05:12:20 +08:00\"","date_modified":"\"2021-07-20 23:31:58 +08:00\"","language":"en","source":""},"title":"Vim","hast":{"type":"root","children":[{"type":"element","tagName":"nav","properties":{"className":"toc"},"children":[{"type":"element","tagName":"ol","properties":{"className":"toc-level toc-level-1"},"children":[{"type":"element","tagName":"li","data":{"hookArgs":[{"type":"element","tagName":"h1","properties":{"id":"the-keybindings-of-vim"},"children":[{"type":"text","value":"The keybindings of Vim"}]}]},"properties":{"className":"toc-item toc-item-h1"},"children":[{"type":"element","tagName":"a","properties":{"className":"toc-link toc-link-h1","href":"/editor.vim#the-keybindings-of-vim"},"children":[{"type":"text","value":"The keybindings of Vim"}]}]},{"type":"element","tagName":"li","data":{"hookArgs":[{"type":"element","tagName":"h1","properties":{"id":"tips-and-tricks"},"children":[{"type":"text","value":"Tips and tricks"}]}]},"properties":{"className":"toc-item toc-item-h1"},"children":[{"type":"element","tagName":"a","properties":{"className":"toc-link toc-link-h1","href":"/editor.vim#tips-and-tricks"},"children":[{"type":"text","value":"Tips and tricks"}]}]}]}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Every sysadmin's favorite default text editor.\nIs being familiar to Vim a path to productivity?\nNo.\nBut being good at it can make for a difference in the day-to-day life of a sysadmin for there are advanced capabilities of this editor.\n"}]},{"type":"element","tagName":"h1","properties":{"id":"the-keybindings-of-vim"},"children":[{"type":"text","value":"The keybindings of Vim"}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"One of the things that make Vim popular is the keybindings.\n"}]},{"type":"element","tagName":"table","properties":{},"children":[{"type":"element","tagName":"thead","properties":{},"children":[{"type":"element","tagName":"tr","properties":{},"children":[{"type":"element","tagName":"th","properties":{},"children":[{"type":"text","value":"Keybinding"}]},{"type":"element","tagName":"th","properties":{},"children":[{"type":"text","value":"Description"}]}]}]},{"type":"element","tagName":"tbody","properties":{},"children":[{"type":"element","tagName":"tr","properties":{},"children":[{"type":"element","tagName":"td","properties":{},"children":[{"type":"element","tagName":"code","properties":{"className":["inline-verbatim"]},"children":[{"type":"text","value":"[m"}]}]},{"type":"element","tagName":"td","properties":{},"children":[{"type":"text","value":"Go to the previous method."}]}]},{"type":"element","tagName":"tr","properties":{},"children":[{"type":"element","tagName":"td","properties":{},"children":[{"type":"element","tagName":"code","properties":{"className":["inline-verbatim"]},"children":[{"type":"text","value":"g~w"}]}]},{"type":"element","tagName":"td","properties":{},"children":[{"type":"text","value":"Toggle letter casing."}]}]},{"type":"element","tagName":"tr","properties":{},"children":[{"type":"element","tagName":"td","properties":{},"children":[{"type":"element","tagName":"code","properties":{"className":["inline-verbatim"]},"children":[{"type":"text","value":"2guW"}]}]},{"type":"element","tagName":"td","properties":{},"children":[{"type":"text","value":"Convert two words into lowercase."}]}]},{"type":"element","tagName":"tr","properties":{},"children":[{"type":"element","tagName":"td","properties":{},"children":[{"type":"element","tagName":"code","properties":{"className":["inline-verbatim"]},"children":[{"type":"text","value":"10d)"}]}]},{"type":"element","tagName":"td","properties":{},"children":[{"type":"text","value":"Delete 10 sentences."}]}]},{"type":"element","tagName":"tr","properties":{},"children":[{"type":"element","tagName":"td","properties":{},"children":[{"type":"element","tagName":"code","properties":{"className":["inline-verbatim"]},"children":[{"type":"text","value":"39zz"}]}]},{"type":"element","tagName":"td","properties":{},"children":[{"type":"text","value":"Place the cursor in the middle in line 39."}]}]},{"type":"element","tagName":"tr","properties":{},"children":[{"type":"element","tagName":"td","properties":{},"children":[{"type":"element","tagName":"code","properties":{"className":["inline-verbatim"]},"children":[{"type":"text","value":"3d10w"}]}]},{"type":"element","tagName":"td","properties":{},"children":[{"type":"text","value":"Delete 10 words and repeat 3 times."}]}]}]}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Most of the time, Vim keybindings is made of mainly two things:\n"}]},{"type":"element","tagName":"ul","properties":{},"children":[{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"The operators denoting an action."}]}]}]},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"The motions describing the scope of the action."}]}]}]}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"There's a certain pattern to it when you use it, too.\n"}]},{"type":"element","tagName":"pre","properties":{"className":["src-block"]},"children":[{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"[count][operator][motion]\n"}]}]},{"type":"element","tagName":"h1","properties":{"id":"tips-and-tricks"},"children":[{"type":"text","value":"Tips and tricks"}]},{"type":"element","tagName":"ul","properties":{},"children":[{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"element","tagName":"code","properties":{"className":["inline-verbatim"]},"children":[{"type":"text","value":":h"}]},{"type":"text","value":" is the help system of Vim.\n It contains all of the documentation of the editor and the installed plugins.\n I recommend to start with the default help page (e.g., "},{"type":"element","tagName":"code","properties":{"className":["inline-verbatim"]},"children":[{"type":"text","value":":h"}]},{"type":"text","value":").\n"}]},{"type":"element","tagName":"ul","properties":{},"children":[{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"You can get the meaning of the keybinding with the help section — e.g., "},{"type":"element","tagName":"code","properties":{"className":["inline-code"]},"children":[{"type":"text","value":":h gg"}]},{"type":"text","value":", "},{"type":"element","tagName":"code","properties":{"className":["inline-code"]},"children":[{"type":"text","value":":h G"}]},{"type":"text","value":".\n"}]}]}]}]},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Vim has fine-grained control motions.\n"}]},{"type":"element","tagName":"ul","properties":{},"children":[{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"element","tagName":"code","properties":{"className":["inline-verbatim"]},"children":[{"type":"text","value":"("}]},{"type":"text","value":" and "},{"type":"element","tagName":"code","properties":{"className":["inline-verbatim"]},"children":[{"type":"text","value":")"}]},{"type":"text","value":" for sentences.\n"}]}]},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"element","tagName":"code","properties":{"className":["inline-verbatim"]},"children":[{"type":"text","value":"{"}]},{"type":"text","value":" and "},{"type":"element","tagName":"code","properties":{"className":["inline-verbatim"]},"children":[{"type":"text","value":"}"}]},{"type":"text","value":" for paragraphs.\n"}]}]},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"element","tagName":"code","properties":{"className":["inline-verbatim"]},"children":[{"type":"text","value":"["}]},{"type":"text","value":" and "},{"type":"element","tagName":"code","properties":{"className":["inline-verbatim"]},"children":[{"type":"text","value":"]"}]},{"type":"text","value":" for sections.\n"}]}]}]}]},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"There are many advanced navigation features in Vim.\n"}]},{"type":"element","tagName":"ul","properties":{},"children":[{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"element","tagName":"code","properties":{"className":["inline-verbatim"]},"children":[{"type":"text","value":"gf"}]},{"type":"text","value":" will go to the file at point.\n"}]}]},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"element","tagName":"code","properties":{"className":["inline-verbatim"]},"children":[{"type":"text","value":"K"}]},{"type":"text","value":" goes to the definition of the keyword at point.\n"}]}]},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"element","tagName":"code","properties":{"className":["inline-verbatim"]},"children":[{"type":"text","value":"Ctrl+O"}]},{"type":"text","value":" will jump back at a previous jump point.\n"}]}]},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"element","tagName":"code","properties":{"className":["inline-verbatim"]},"children":[{"type":"text","value":"gd"}]},{"type":"text","value":" go the local definition of the keyword at point.\n"}]}]},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"element","tagName":"code","properties":{"className":["inline-verbatim"]},"children":[{"type":"text","value":"H"}]},{"type":"text","value":", "},{"type":"element","tagName":"code","properties":{"className":["inline-verbatim"]},"children":[{"type":"text","value":"M"}]},{"type":"text","value":", and "},{"type":"element","tagName":"code","properties":{"className":["inline-verbatim"]},"children":[{"type":"text","value":"L"}]},{"type":"text","value":" places the cursor in higher, middle, and lower part in the current screen, respectively.\n"}]}]},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"element","tagName":"code","properties":{"className":["inline-verbatim"]},"children":[{"type":"text","value":"zt"}]},{"type":"text","value":", "},{"type":"element","tagName":"code","properties":{"className":["inline-verbatim"]},"children":[{"type":"text","value":"zz"}]},{"type":"text","value":", and "},{"type":"element","tagName":"code","properties":{"className":["inline-verbatim"]},"children":[{"type":"text","value":"zb"}]},{"type":"text","value":" displays the current line in the top, middle, and bottom part of the screen, respectively.\n"}]}]}]}]}]}]},"backlinks":[]},"__N_SSG":true}