mirror of
https://github.com/foo-dogsquared/wiki.git
synced 2025-02-07 15:19:04 +00:00
1 line
6.1 KiB
JSON
1 line
6.1 KiB
JSON
{"pageProps":{"metadata":{"date":"2022-04-03 16:59:05 +08:00","date_modified":"2022-04-03 16:59:24 +08:00","language":"en","source":""},"title":"Neovim folds","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":"ul","properties":{},"children":[{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"it is a built-in feature in Neovim;\n enables you to quickly navigate a long document by hiding them and opening them when you want\n"}]}]},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"some keybindings for managing folds\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":"Keymap"}]},{"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-code"]},"children":[{"type":"text","value":"zf"}]}]},{"type":"element","tagName":"td","properties":{},"children":[{"type":"text","value":"Create a fold."}]}]},{"type":"element","tagName":"tr","properties":{},"children":[{"type":"element","tagName":"td","properties":{},"children":[{"type":"element","tagName":"code","properties":{"className":["inline-code"]},"children":[{"type":"text","value":"zA"}]}]},{"type":"element","tagName":"td","properties":{},"children":[{"type":"text","value":"Toggle a fold recursively."}]}]},{"type":"element","tagName":"tr","properties":{},"children":[{"type":"element","tagName":"td","properties":{},"children":[{"type":"element","tagName":"code","properties":{"className":["inline-code"]},"children":[{"type":"text","value":"zM"}]}]},{"type":"element","tagName":"td","properties":{},"children":[{"type":"text","value":"Close all folds."}]}]},{"type":"element","tagName":"tr","properties":{},"children":[{"type":"element","tagName":"td","properties":{},"children":[{"type":"element","tagName":"code","properties":{"className":["inline-code"]},"children":[{"type":"text","value":"zR"}]}]},{"type":"element","tagName":"td","properties":{},"children":[{"type":"text","value":"Open all folds."}]}]},{"type":"element","tagName":"tr","properties":{},"children":[{"type":"element","tagName":"td","properties":{},"children":[{"type":"element","tagName":"code","properties":{"className":["inline-code"]},"children":[{"type":"text","value":"zj"}]}]},{"type":"element","tagName":"td","properties":{},"children":[{"type":"text","value":"Move one fold down."}]}]},{"type":"element","tagName":"tr","properties":{},"children":[{"type":"element","tagName":"td","properties":{},"children":[{"type":"element","tagName":"code","properties":{"className":["inline-code"]},"children":[{"type":"text","value":"zk"}]}]},{"type":"element","tagName":"td","properties":{},"children":[{"type":"text","value":"Move one fold up."}]}]}]}]}]},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"while in insert mode, there are no folds under your cursor so you can see what you type\n"}]}]},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"while manually managing folds can be tedious, Neovim does have a way to automatically manage folds for you;\n this is dictated through the "},{"type":"element","tagName":"code","properties":{"className":["inline-code"]},"children":[{"type":"text","value":"foldmethod"}]},{"type":"text","value":" variable;\n for more information for the following methods, see "},{"type":"element","tagName":"code","properties":{"className":["inline-code"]},"children":[{"type":"text","value":"fold-${VALUE}"}]},{"type":"text","value":" with the "},{"type":"element","tagName":"a","properties":{"href":"/editor.neovim.help-system"},"children":[{"type":"text","value":"Neovim help system"}]}]},{"type":"element","tagName":"ul","properties":{},"children":[{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"with "},{"type":"element","tagName":"code","properties":{"className":["inline-code"]},"children":[{"type":"text","value":"manual"}]},{"type":"text","value":" value, no additional actions are done\n"}]}]},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"with "},{"type":"element","tagName":"code","properties":{"className":["inline-code"]},"children":[{"type":"text","value":"marker"}]},{"type":"text","value":" value, a fold will be created ala-HTML markers\n"}]}]},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"with "},{"type":"element","tagName":"code","properties":{"className":["inline-code"]},"children":[{"type":"text","value":"expr"}]},{"type":"text","value":" value, a fold will be managed through its fold level evaluated from "},{"type":"element","tagName":"code","properties":{"className":["inline-code"]},"children":[{"type":"text","value":"foldexpr"}]},{"type":"text","value":" function;\n certain tools like "},{"type":"element","tagName":"a","properties":{"href":"https://github.com/nvim-treesitter/nvim-treesitter"},"children":[{"type":"text","value":"nvim-treesitter"}]},{"type":"text","value":" takes advantage of this to arrange the code through its blocks, scope, etc.\n"}]}]}]}]}]}]},"backlinks":[]},"__N_SSG":true} |