]> apps.delaporte.us Git - dotfiles.git/commitdiff
Improved vim plugin setup for vim 8+
authorEdward Delaporte <edward@delaporte.us>
Sat, 21 Feb 2026 22:30:24 +0000 (16:30 -0600)
committerEdward Delaporte <edward@delaporte.us>
Sat, 21 Feb 2026 22:30:24 +0000 (16:30 -0600)
files/vimrc
invoke/setup-linux/tasks.py

index 19c388ab51ece292d34acecc752a0d198d3a2889..bae30e99ba36bc3e8d36b69335cd230ec0479fa6 100644 (file)
@@ -30,21 +30,11 @@ filetype off                  " required
 "  autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
 " endif
 
-" =================
-" Here be Plugins!
-" =================
-" call plug#begin('~/.vim/plugged')
-
-" Markdown highlighting
-" Plug 'tpope/vim-markdown'
-" Plug 'plasticboy/vim-markdown'
-" let g:markdown_github_languages = ['sh', 'python']
-
+" Old Plugins
+" -----------
 " Distraction free writing.
 " Plug 'junegunn/goyo.vim'
 
-" Better status line.
-" Plug 'bling/vim-airline'
 
 " Plugin 'Windows-PowerShell-Syntax-Plugin'
 
@@ -83,12 +73,30 @@ au BufNewFile,BufRead *.go set noet ts=2 sw=2 sts=2
 " Working with Markdown
 
 au BufNewFile,BufFilePre,BufRead *.md set filetype=markdown
-" colorscheme desert
+colorscheme desert
 
 " https://justinjoyce.dev/every-built-in-vim-color-scheme-with-screenshots/
 set bg=dark
 set number
 
+
+" =================
+"  Plugins vim 8+
+" =================
+"
+" clone into ~/.vim/pack/vendor/opt
+" dotfiles/invoke/setup-linux has helper tasks to install
+packadd nerdtree
+
+" Markdown Sytax
+packadd markdown
+let g:vim_markdown_folding_disabled = 1
+
+" Better status line.
+packadd airline
+
+
+
 set backupdir=c:\temp,.backup/,~/.backup/,/tmp//
 set directory=~/.swp
 set undodir=c:\temp,.undo/,~/.undo/,/tmp//
index 67092e733315dd37a7aa993e5860f026e0ebbac7..093462b8e62020c25ffda87a62bf1ee8baca7512 100644 (file)
@@ -74,3 +74,25 @@ def link_bashrc(c):
 def link_all_for_invoke(c):
     link_to_home(c, 'files/pc/tasks.py')
     link_to_home(c, 'files/pc/bashrc', add_dot=True)
+
+@task
+def vim_nerdtree(c):
+    add_vim_plugin(c, 'https://github.com/preservim/nerdtree.git', 'nerdtree')
+
+@task
+def vim_markdown(c):
+    add_vim_plugin(c, 'https://github.com/preservim/vim-markdown.git', 'markdown')
+ 
+@task
+def vim_airline(c):
+    add_vim_plugin(c, 'https://github.com/vim-airline/vim-airline.git', 'airline')
+
+@task
+def add_vim_plugin(c, git_path, folder):
+    c.run(f'mkdir -p {HOME}/.vim/pack/')
+    c.run(f'mkdir -p {HOME}/.vim/pack/vendor')
+    c.run(f'mkdir -p {HOME}/.vim/pack/vendor/opt')
+    c.run(f'git clone --depth 1 {git_path} {HOME}/.vim/pack/vendor/opt/{folder}')
+    c.run(f'ls -l {HOME}/.vim/pack/vendor/opt')
+    print(f"Use `packadd {folder}` in .vimrc to enable")
+