feat: enhance Neovim configuration with NetRW disabling, auto number toggling, and code folding setup
This commit is contained in:
parent
3338d39206
commit
dfaacbb0e1
3 changed files with 104 additions and 4 deletions
26
notes.md
Normal file
26
notes.md
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
## Code folding
|
||||
|
||||
To see the code fold in left gutter.
|
||||
set foldcolumn=1
|
||||
|
||||
### Creating fold
|
||||
#### Set coding folding mode
|
||||
:set foldmethod=manual
|
||||
|
||||
#### Creating a manual fold
|
||||
1. First select a section of lines in visual mode.
|
||||
2. Press `zf` to create fold, it is `zd` to delete the same fold.
|
||||
3. `zo` to open fold, `zc` to close fold, `za` to toggle open/close fold
|
||||
|
||||
|
||||
#### Creating indent fold
|
||||
:set foldmethod=indent
|
||||
|
||||
|
||||
#### Creating expr fold using nvim-treesitter
|
||||
:set foldlevel=2
|
||||
:set foldmethod=expr
|
||||
:set foldexpr=nvim_treesitter#foldexpr()
|
||||
|
||||
|
||||
vim.wo.foldmethod = 'expr'
|
||||
Loading…
Add table
Add a link
Reference in a new issue