Use plugin for wrapping
This commit is contained in:
39
init.vim
39
init.vim
@ -1,5 +1,3 @@
|
||||
" vim-bootstrap 2026-01-05 15:36:51
|
||||
|
||||
"*****************************************************************************
|
||||
"" Vim-Plug core
|
||||
"*****************************************************************************
|
||||
@ -30,6 +28,7 @@ call plug#begin(expand('~/.config/nvim/plugged'))
|
||||
"*****************************************************************************
|
||||
"" Plug install packages
|
||||
"*****************************************************************************
|
||||
" file management
|
||||
Plug 'scrooloose/nerdtree'
|
||||
Plug 'jistr/vim-nerdtree-tabs'
|
||||
" coding comments
|
||||
@ -54,6 +53,7 @@ Plug 'Raimondi/delimitMate'
|
||||
Plug 'Yggdroot/indentLine'
|
||||
" bootstrap support
|
||||
"Plug 'editor-bootstrap/vim-bootstrap-updater'
|
||||
Plug 'andrewferrier/wrapping.nvim'
|
||||
|
||||
"Autoreload files when changed externally
|
||||
Plug 'TheZoq2/neovim-auto-autoread'
|
||||
@ -210,7 +210,7 @@ colorscheme molokai
|
||||
set wildmenu
|
||||
|
||||
" mouse support
|
||||
set mouse=
|
||||
set mouse=a
|
||||
|
||||
set mousemodel=popup
|
||||
set t_Co=256
|
||||
@ -299,10 +299,10 @@ nnoremap <silent> <F2> :NERDTreeFind<CR>
|
||||
nnoremap <silent> <F3> :NERDTreeToggle<CR>
|
||||
|
||||
" grep.vim
|
||||
nnoremap <silent> <leader>f :Rgrep<CR>
|
||||
let Grep_Default_Options = '-IR'
|
||||
let Grep_Skip_Files = '*.log *.db'
|
||||
let Grep_Skip_Dirs = '.git node_modules'
|
||||
"nnoremap <silent> <leader>f :Rgrep<CR>
|
||||
"let Grep_Default_Options = '-IR'
|
||||
"let Grep_Skip_Files = '*.log *.db'
|
||||
"let Grep_Skip_Dirs = '.git node_modules'
|
||||
|
||||
" terminal emulation
|
||||
nnoremap <silent> <leader>sh :terminal<CR>
|
||||
@ -322,7 +322,8 @@ if !exists('*s:setupWrapping')
|
||||
set wrap
|
||||
set linebreak
|
||||
set wm=2
|
||||
set textwidth=0
|
||||
set nolist "hide non-printable chars
|
||||
set textwidth=79
|
||||
set wrapmargin=0
|
||||
set breakat=\ \t!@%*[]<>;:/?
|
||||
nnoremap <silent> <buffer> j gj
|
||||
@ -346,11 +347,11 @@ augroup vimrc-remember-cursor-position
|
||||
augroup END
|
||||
|
||||
"" txt and markdown
|
||||
augroup vimrc-wrapping
|
||||
autocmd!
|
||||
autocmd BufRead,BufNewFile *.txt call s:setupWrapping()
|
||||
autocmd BufRead,BufNewFile *.md call s:setupWrapping()
|
||||
augroup END
|
||||
"augroup vimrc-wrapping
|
||||
"" autocmd!
|
||||
"" autocmd BufRead,BufNewFile,BufWinEnter *.txt call s:setupWrapping()
|
||||
"" autocmd BufRead,BufNewFile,BufWinEnter *.md call s:setupWrapping()
|
||||
"augroup END
|
||||
|
||||
"" make/cmake
|
||||
augroup vimrc-make-cmake
|
||||
@ -490,6 +491,7 @@ nnoremap <Leader>o :.GBrowse<CR>
|
||||
"" Custom configs
|
||||
"*****************************************************************************
|
||||
|
||||
" See custom-lang-configs.vim for language-specific configs, copy here has needed
|
||||
|
||||
"*****************************************************************************
|
||||
"*****************************************************************************
|
||||
@ -557,11 +559,20 @@ if status_ok then
|
||||
end
|
||||
EOF
|
||||
|
||||
" Remove icons from the gutter next to markdown headings
|
||||
lua << EOF
|
||||
require('render-markdown').setup({
|
||||
heading = {
|
||||
-- Set this to false to remove icons from the gutter next to headings
|
||||
sign = false,
|
||||
},
|
||||
})
|
||||
EOF
|
||||
|
||||
" wrapping.nvim setup
|
||||
lua << EOF
|
||||
require("wrapping").setup({
|
||||
notify_on_switch = true,
|
||||
softener = { markdown = true, text = true }
|
||||
})
|
||||
|
||||
EOF
|
||||
|
||||
Reference in New Issue
Block a user