Mercurial > index.cgi > dotfiles
comparison .shared/.vim/vimrc @ 265:df0b24d4fabd
Think I'm ready to check this all in now; shared dotfiles that can be "sent"
through an SSH connection to be used and cleaned up when finished.
| author | Steve Huston <huston@srhuston.net> |
|---|---|
| date | Wed, 24 Apr 2024 16:15:40 -0400 |
| parents | .vimrc@d2bde75bd73a |
| children |
comparison
equal
deleted
inserted
replaced
| 264:bb69763716a7 | 265:df0b24d4fabd |
|---|---|
| 1 version 5.0 | |
| 2 | |
| 3 " First things first, here's where to find everything | |
| 4 set runtimepath=$DOTHOME/.vim,$VIM/vimfiles,$VIMRUNTIME,$VIM/vimfiles/after,$DOTHOME/.vim/after | |
| 5 if v:version > 704 | |
| 6 set packpath=$DOTHOME/.vim,$VIM/vimfiles,$VIMRUNTIME,$VIM/vimfiles/after,$DOTHOME/.vim/after | |
| 7 endif | |
| 8 | |
| 9 set nocompatible | |
| 10 set mouse=a | |
| 11 set background=dark | |
| 12 set textwidth=78 | |
| 13 set showmatch | |
| 14 set hls | |
| 15 hi Normal guibg=black guifg=white | |
| 16 | |
| 17 " These were updated in a recent version.. I prefer the old coloring so | |
| 18 " setting it by default here. | |
| 19 hi def link diffRemoved WarningMsg | |
| 20 hi def link diffChanged PreProc | |
| 21 hi def link diffAdded Identifier | |
| 22 | |
| 23 autocmd FileType make setlocal noet | setlocal ts=8 | setlocal sw=8 | |
| 24 let macvim_skip_colorscheme=1 | |
| 25 | |
| 26 " These might not be needed with the inclusion of vim-sleuth now... | |
| 27 set autoindent | |
| 28 set cindent | |
| 29 set smartindent | |
| 30 set smarttab | |
| 31 set tabstop=4 | |
| 32 set shiftwidth=2 | |
| 33 set softtabstop=2 | |
| 34 set expandtab | |
| 35 | |
| 36 " Don't need these anymore since the plug#end below calls it | |
| 37 "syntax on | |
| 38 "filetype plugin indent on | |
| 39 | |
| 40 call plug#begin() | |
| 41 " https://github.com/junegunn/vim-plug | |
| 42 " The default plugin directory will be as follows: | |
| 43 " - Vim (Linux/macOS): '~/.vim/plugged' | |
| 44 " - Vim (Windows): '~/vimfiles/plugged' | |
| 45 " - Neovim (Linux/macOS/Windows): stdpath('data') . '/plugged' | |
| 46 " You can specify a custom plugin directory by passing it as the argument | |
| 47 " - e.g. `call plug#begin('~/.vim/plugged')` | |
| 48 " - Avoid using standard Vim directory names like 'plugin' | |
| 49 | |
| 50 " Make sure you use single quotes | |
| 51 | |
| 52 " ========== My plugins here ========== | |
| 53 " https://github.com/vim-airline/vim-airline | |
| 54 " Status bar. I like status bars. | |
| 55 Plug 'vim-airline/vim-airline' | |
| 56 | |
| 57 " https://github.com/tpope/vim-sleuth | |
| 58 " automatically adjusts 'shiftwidth' and 'expandtab' heuristically | |
| 59 Plug 'tpope/vim-sleuth' | |
| 60 | |
| 61 " https://github.com/preservim/vim-indent-guides | |
| 62 " visually displays indent levels | |
| 63 Plug 'preservim/vim-indent-guides' | |
| 64 | |
| 65 " https://github.com/tpope/vim-endwise | |
| 66 " wisely 'ends' structures (think do/done in bash, if/fi, etc) | |
| 67 Plug 'tpope/vim-endwise' | |
| 68 | |
| 69 " https://github.com/rstacruz/vim-closer | |
| 70 " closes brackets | |
| 71 ""Plug 'rstacruz/vim-closer' | |
| 72 | |
| 73 " https://github.com/jiangmiao/auto-pairs | |
| 74 " Less conservative version of vim-closer, see if it works better | |
| 75 Plug 'jiangmiao/auto-pairs' | |
| 76 | |
| 77 " https://github.com/tpope/vim-surround | |
| 78 " provides mappings to easily delete, change and add surroundings (quotes, HTML tags, etc) in pairs | |
| 79 Plug 'tpope/vim-surround' | |
| 80 | |
| 81 " https://github.com/ntpeters/vim-better-whitespace | |
| 82 " highlights whitespace at the end of lines | |
| 83 Plug 'ntpeters/vim-better-whitespace' | |
| 84 | |
| 85 " https://github.com/gabrielelana/vim-markdown | |
| 86 " markdown syntax highlighting and whatnot (better than the built-in which is similar to tpope from what I can tell) | |
| 87 Plug 'gabrielelana/vim-markdown' | |
| 88 | |
| 89 " https://github.com/jamessan/vim-gnupg | |
| 90 " gnupg integration (replaces the one I had before) | |
| 91 Plug 'jamessan/vim-gnupg' | |
| 92 | |
| 93 " https://github.com/rodjek/vim-puppet | |
| 94 " puppet syntax, indenting, etc - recommended by maintainers of the one I had before | |
| 95 Plug 'rodjek/vim-puppet' | |
| 96 | |
| 97 " https://github.com/tpope/vim-fugitive | |
| 98 " Lots of git integrations | |
| 99 Plug 'tpope/vim-fugitive' | |
| 100 | |
| 101 " ========== My plugins end ========== | |
| 102 " Below are the examples (commented out) that came with plug | |
| 103 | |
| 104 " Shorthand notation for GitHub; translates to https://github.com/junegunn/vim-easy-align | |
| 105 "Plug 'junegunn/vim-easy-align' | |
| 106 | |
| 107 " Any valid git URL is allowed | |
| 108 "Plug 'https://github.com/junegunn/seoul256.vim.git' | |
| 109 | |
| 110 " Using a tagged release; wildcard allowed (requires git 1.9.2 or above) | |
| 111 "Plug 'fatih/vim-go', { 'tag': '*' } | |
| 112 | |
| 113 " Using a non-default branch | |
| 114 "Plug 'neoclide/coc.nvim', { 'branch': 'release' } | |
| 115 | |
| 116 " Use 'dir' option to install plugin in a non-default directory | |
| 117 "Plug 'junegunn/fzf', { 'dir': '~/.fzf' } | |
| 118 | |
| 119 " Post-update hook: run a shell command after installing or updating the plugin | |
| 120 "Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' } | |
| 121 | |
| 122 " Post-update hook can be a lambda expression | |
| 123 "Plug 'junegunn/fzf', { 'do': { -> fzf#install() } } | |
| 124 | |
| 125 " If the vim plugin is in a subdirectory, use 'rtp' option to specify its path | |
| 126 "Plug 'nsf/gocode', { 'rtp': 'vim' } | |
| 127 | |
| 128 " On-demand loading: loaded when the specified command is executed | |
| 129 "Plug 'preservim/nerdtree', { 'on': 'NERDTreeToggle' } | |
| 130 | |
| 131 " On-demand loading: loaded when a file with a specific file type is opened | |
| 132 "Plug 'tpope/vim-fireplace', { 'for': 'clojure' } | |
| 133 | |
| 134 " Unmanaged plugin (manually installed and updated) | |
| 135 "Plug '~/my-prototype-plugin' | |
| 136 | |
| 137 " Initialize plugin system | |
| 138 " - Automatically executes `filetype plugin indent on` and `syntax enable`. | |
| 139 call plug#end() | |
| 140 " You can revert the settings after the call like so: | |
| 141 " filetype indent off " Disable file-type-specific indentation | |
| 142 " syntax off " Disable syntax highlighting |
