Mercurial > index.cgi > dotfiles
comparison .vimrc @ 246:6af02446233f
New Vim plugin manager and its configuration should make things more portable
author | Steve Huston <huston@srhuston.net> |
---|---|
date | Tue, 26 Mar 2024 12:15:41 -0400 |
parents | 6e7913283c7a |
children | fe6f4e3da0e7 |
comparison
equal
deleted
inserted
replaced
245:9f7c5573b567 | 246:6af02446233f |
---|---|
1 version 5.0 | 1 version 5.0 |
2 set nocompatible | 2 set nocompatible |
3 set mouse=a | |
4 set background=dark | |
5 set textwidth=78 | |
6 set showmatch | |
7 set hls | |
8 hi Normal guibg=black guifg=white | |
9 autocmd FileType make setlocal noet | setlocal ts=8 | setlocal sw=8 | |
10 | |
11 " These might not be needed with the inclusion of vim-sleuth now... | |
3 set autoindent | 12 set autoindent |
4 set cindent | 13 set cindent |
5 set mouse=a | |
6 set smartindent | 14 set smartindent |
7 set smarttab | 15 set smarttab |
8 set tabstop=4 | 16 set tabstop=4 |
9 set shiftwidth=2 | 17 set shiftwidth=2 |
10 set softtabstop=2 | 18 set softtabstop=2 |
11 set expandtab | 19 set expandtab |
12 syntax on | 20 |
13 set background=dark | 21 " Don't need these anymore since the plug#end below calls it |
14 set textwidth=78 | 22 "syntax on |
15 set showmatch | 23 "filetype plugin indent on |
16 set hls | 24 |
17 hi Normal guibg=black guifg=white | 25 call plug#begin() |
18 autocmd FileType make setlocal noet | setlocal ts=8 | setlocal sw=8 | 26 " The default plugin directory will be as follows: |
19 filetype plugin indent on | 27 " - Vim (Linux/macOS): '~/.vim/plugged' |
28 " - Vim (Windows): '~/vimfiles/plugged' | |
29 " - Neovim (Linux/macOS/Windows): stdpath('data') . '/plugged' | |
30 " You can specify a custom plugin directory by passing it as the argument | |
31 " - e.g. `call plug#begin('~/.vim/plugged')` | |
32 " - Avoid using standard Vim directory names like 'plugin' | |
33 | |
34 " Make sure you use single quotes | |
35 | |
36 " ========== My plugins here ========== | |
37 " automatically adjusts 'shiftwidth' and 'expandtab' heuristically | |
38 Plug 'tpope/vim-sleuth' | |
39 | |
40 " visually displays indent levels | |
41 Plug 'preservim/vim-indent-guides' | |
42 | |
43 " wisely 'ends' structures (think do/done in bash, if/fi, etc) | |
44 Plug 'tpope/vim-endwise' | |
45 | |
46 " closes brackets | |
47 Plug 'rstacruz/vim-closer' | |
48 | |
49 " provides mappings to easily delete, change and add surroundings (quotes, HTML tags, etc) in pairs | |
50 Plug 'tpope/vim-surround' | |
51 | |
52 " highlights whitespace at the end of lines | |
53 Plug 'ntpeters/vim-better-whitespace' | |
54 | |
55 " markdown syntax highlighting and whatnot (better than the built-in which is similar to tpope from what I can tell) | |
56 Plug 'gabrielelana/vim-markdown' | |
57 | |
58 " gnupg integration (replaces the one I had before) | |
59 Plug 'jamessan/vim-gnupg' | |
60 | |
61 " puppet syntax, indenting, etc - recommended by maintainers of the one I had before | |
62 Plug 'rodjek/vim-puppet' | |
63 | |
64 " ========== My plugins end ========== | |
65 " Below are the examples (commented out) that came with plug | |
66 | |
67 " Shorthand notation for GitHub; translates to https://github.com/junegunn/vim-easy-align | |
68 "Plug 'junegunn/vim-easy-align' | |
69 | |
70 " Any valid git URL is allowed | |
71 "Plug 'https://github.com/junegunn/seoul256.vim.git' | |
72 | |
73 " Using a tagged release; wildcard allowed (requires git 1.9.2 or above) | |
74 "Plug 'fatih/vim-go', { 'tag': '*' } | |
75 | |
76 " Using a non-default branch | |
77 "Plug 'neoclide/coc.nvim', { 'branch': 'release' } | |
78 | |
79 " Use 'dir' option to install plugin in a non-default directory | |
80 "Plug 'junegunn/fzf', { 'dir': '~/.fzf' } | |
81 | |
82 " Post-update hook: run a shell command after installing or updating the plugin | |
83 "Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' } | |
84 | |
85 " Post-update hook can be a lambda expression | |
86 "Plug 'junegunn/fzf', { 'do': { -> fzf#install() } } | |
87 | |
88 " If the vim plugin is in a subdirectory, use 'rtp' option to specify its path | |
89 "Plug 'nsf/gocode', { 'rtp': 'vim' } | |
90 | |
91 " On-demand loading: loaded when the specified command is executed | |
92 "Plug 'preservim/nerdtree', { 'on': 'NERDTreeToggle' } | |
93 | |
94 " On-demand loading: loaded when a file with a specific file type is opened | |
95 "Plug 'tpope/vim-fireplace', { 'for': 'clojure' } | |
96 | |
97 " Unmanaged plugin (manually installed and updated) | |
98 "Plug '~/my-prototype-plugin' | |
99 | |
100 " Initialize plugin system | |
101 " - Automatically executes `filetype plugin indent on` and `syntax enable`. | |
102 call plug#end() | |
103 " You can revert the settings after the call like so: | |
104 " filetype indent off " Disable file-type-specific indentation | |
105 " syntax off " Disable syntax highlighting |