📝 Enabled folds in nvim

This commit is contained in:
z3rOR0ne 2023-02-05 02:17:16 -08:00
parent ccecc7b5b5
commit 75e83b1504
2 changed files with 23 additions and 1 deletions

View file

@ -33,7 +33,7 @@ vim.opt.cindent = true
vim.opt.tabstop = 8
vim.opt.cursorcolumn = true
-- Disable folds
vim.g.nofoldenable = true
-- vim.g.nofoldenable = true
-- Fix Splitting
vim.opt.splitbelow = true
vim.opt.splitright = true
@ -65,6 +65,9 @@ vim.cmd([[autocmd Filetype json let g:indentLine_setConceal = 0]])
-- enable clipboard
vim.cmd([[set clipboard+=unnamedplus]])
-- enable folds
vim.cmd([[set foldmethod=manual]])
-- enable hard/soft wrap
vim.cmd([[set wrap linebreak textwidth=80]])

View file

@ -152,6 +152,25 @@ INTERESTING CHAINS
:.,$d - Delete every line from the current line to the end of the file
:%d - delete every line
# https://neovim.io/doc/user/fold.html
FOLDS (folds condense text in case its alot of text you don't need to see right
now)
:set foldmethod=manual
zf - create
zd - delete
zD - recursive delete
za - toggle fold under cursor
zA - toggle all folds under cursor recursively
zc - close fold under cursor
zo - open fold under cursor
zC - close all folds under cursor recursively
zO - open all folds under cursor recursively
zM - all collapse
zR - all reveal
IN VISUAL MODE you can select all text you wish to fold by simply highlighting
it then invoking 'zf'.
FROM NORMAL MODE, ENTERING OTHER MODES
i - enter INSERT mode at the current cursor position
a - enter INSERT mode at the following cursor position (appending)