From dde7eaec28d3a0b739b08d3699ff07d90da66c61 Mon Sep 17 00:00:00 2001 From: Matt Wiseley Date: Tue, 6 Jan 2026 10:23:37 -0500 Subject: [PATCH] Merged home & work configs --- after/ftplugin/markdown.lua | 10 --- init.vim | 119 +++++++++--------------------------- 2 files changed, 30 insertions(+), 99 deletions(-) delete mode 100644 after/ftplugin/markdown.lua diff --git a/after/ftplugin/markdown.lua b/after/ftplugin/markdown.lua deleted file mode 100644 index f67655e..0000000 --- a/after/ftplugin/markdown.lua +++ /dev/null @@ -1,10 +0,0 @@ --- Soft wrap at the word -vim.opt_local.wrap = true -- Enable wrapping -vim.opt_local.linebreak = true -- Wrap at words, not in the middle of a word -vim.opt_local.breakindent = true -- Keep the same indentation on wrapped lines - --- Navigation fix --- By default, 'j' and 'k' jump physical lines. --- These remaps make them move by visual lines. -vim.keymap.set('n', 'j', 'gj', { buffer = true }) -vim.keymap.set('n', 'k', 'gk', { buffer = true }) diff --git a/init.vim b/init.vim index 667f17e..831426c 100644 --- a/init.vim +++ b/init.vim @@ -1,7 +1,9 @@ +" vim-bootstrap 2026-01-05 15:36:51 + "***************************************************************************** "" Vim-Plug core "***************************************************************************** -let vimplug_exists=expand('~/.config/nvim/autoload/plug.vim') +let vimplug_exists=expand('~/./autoload/plug.vim') let curl_exists=expand('curl') let g:vim_bootstrap_langs = "html,javascript,lua,php,python" @@ -28,7 +30,6 @@ call plug#begin(expand('~/.config/nvim/plugged')) "***************************************************************************** "" Plug install packages "***************************************************************************** -" file management Plug 'scrooloose/nerdtree' Plug 'jistr/vim-nerdtree-tabs' " coding comments @@ -157,7 +158,7 @@ filetype plugin indent on set encoding=utf-8 set fileencoding=utf-8 set fileencodings=utf-8 - +set ttyfast "" Fix backspace indent set backspace=indent,eol,start @@ -213,8 +214,8 @@ set mouse= set mousemodel=popup set t_Co=256 -set gfn=Monospace\ 10 "set guioptions=egmrti +set gfn=Monospace\ 10 if has("gui_running") if has("gui_mac") || has("gui_macvim") @@ -228,13 +229,16 @@ else let g:indentLine_concealcursor = '' let g:indentLine_char = '┆' let g:indentLine_faster = 1 + endif "" Disable the blinking cursor. set gcr=a:blinkon0 -au TermEnter * setlocal scrolloff=0 -au TermLeave * setlocal scrolloff=3 +set scrolloff=3 +" alt to above, not sure what the diff is +"au TermEnter * setlocal scrolloff=0 +"au TermLeave * setlocal scrolloff=3 "" Status bar @@ -316,8 +320,13 @@ command! FixWhitespace :%s/\s\+$//e if !exists('*s:setupWrapping') function s:setupWrapping() set wrap + set linebreak set wm=2 - set textwidth=79 + set textwidth=0 + set wrapmargin=0 + set breakat=\ \t!@%*[]<>;:/? + nnoremap j gj + nnoremap k gk endfunction endif @@ -336,10 +345,11 @@ augroup vimrc-remember-cursor-position autocmd BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g`\"" | endif augroup END -"" txt +"" txt and markdown augroup vimrc-wrapping autocmd! autocmd BufRead,BufNewFile *.txt call s:setupWrapping() + autocmd BufRead,BufNewFile *.md call s:setupWrapping() augroup END "" make/cmake @@ -414,10 +424,10 @@ nnoremap e :FZF -m nmap y :History: " snippets -let g:UltiSnipsExpandTrigger="" -let g:UltiSnipsJumpForwardTrigger="" -let g:UltiSnipsJumpBackwardTrigger="" -let g:UltiSnipsEditSplit="vertical" +"let g:UltiSnipsExpandTrigger="" +"let g:UltiSnipsJumpForwardTrigger="" +"let g:UltiSnipsJumpBackwardTrigger="" +"let g:UltiSnipsEditSplit="vertical" " ale let g:ale_linters = {} @@ -480,82 +490,6 @@ nnoremap o :.GBrowse "" Custom configs "***************************************************************************** -" html -" for html files, 2 spaces -autocmd Filetype html setlocal ts=2 sw=2 expandtab - - -" javascript -let g:javascript_enable_domhtmlcss = 1 - -" vim-javascript -augroup vimrc-javascript - autocmd! - autocmd FileType javascript setl tabstop=4|setl shiftwidth=4|setl expandtab softtabstop=4 -augroup END - - -" lua - - -" php -" Phpactor plugin -" Include use statement -nmap u :call phpactor#UseAdd() -" Invoke the context menu -nmap mm :call phpactor#ContextMenu() -" Invoke the navigation menu -nmap nn :call phpactor#Navigate() -" Goto definition of class or class member under the cursor -nmap oo :call phpactor#GotoDefinition() -nmap oh :call phpactor#GotoDefinition('hsplit') -nmap ov :call phpactor#GotoDefinition('vsplit') -nmap ot :call phpactor#GotoDefinition('tabnew') -" Show brief information about the symbol under the cursor -nmap K :call phpactor#Hover() -" Transform the classes in the current file -nmap tt :call phpactor#Transform() -" Generate a new class (replacing the current file) -nmap cc :call phpactor#ClassNew() -" Extract expression (normal mode) -nmap ee :call phpactor#ExtractExpression(v:false) -" Extract expression from selection -vmap ee :call phpactor#ExtractExpression(v:true) -" Extract method from selection -vmap em :call phpactor#ExtractMethod() - - -" python -" vim-python -augroup vimrc-python - autocmd! - autocmd FileType python setlocal expandtab shiftwidth=4 tabstop=8 colorcolumn=79 - \ formatoptions+=croq softtabstop=4 - \ cinwords=if,elif,else,for,while,try,except,finally,def,class,with -augroup END - -" jedi-vim -let g:jedi#popup_on_dot = 0 -let g:jedi#goto_assignments_command = "g" -let g:jedi#goto_definitions_command = "d" -let g:jedi#documentation_command = "K" -let g:jedi#usages_command = "n" -let g:jedi#rename_command = "r" -let g:jedi#show_call_signatures = "0" -let g:jedi#completions_command = "" -let g:jedi#smart_auto_mappings = 0 - -" ale -:call extend(g:ale_linters, { - \'python': ['flake8'], }) - -" vim-airline -let g:airline#extensions#virtualenv#enabled = 1 - -" Syntax highlight -let python_highlight_all = 1 - - "***************************************************************************** "***************************************************************************** @@ -608,7 +542,6 @@ endif " Seemless clipboard integration set clipboard+=unnamedplus -" Treesitter config for markdown " Treesitter config for markdown lua << EOF -- Check if the module exists before trying to require it @@ -624,3 +557,11 @@ if status_ok then end EOF +lua << EOF +require('render-markdown').setup({ + heading = { + -- Set this to false to remove icons from the gutter next to headings + sign = false, + }, +}) +EOF