aboutsummaryrefslogtreecommitdiff
path: root/vim/config
diff options
context:
space:
mode:
Diffstat (limited to 'vim/config')
-rw-r--r--vim/config/backspace.vim8
-rw-r--r--vim/config/backup.vim12
-rw-r--r--vim/config/buffers.vim14
-rw-r--r--vim/config/command.vim35
-rw-r--r--vim/config/completion.vim28
-rw-r--r--vim/config/digraphs.vim6
-rw-r--r--vim/config/display.vim41
-rw-r--r--vim/config/dist.vim30
-rw-r--r--vim/config/files.vim41
-rw-r--r--vim/config/format.vim38
-rw-r--r--vim/config/match.vim2
-rw-r--r--vim/config/os.vim8
-rw-r--r--vim/config/packages.vim5
-rw-r--r--vim/config/registers.vim4
-rw-r--r--vim/config/scroll.vim8
-rw-r--r--vim/config/search.vim23
-rw-r--r--vim/config/spell.vim21
-rw-r--r--vim/config/substitution.vim11
-rw-r--r--vim/config/swapfile.vim15
-rw-r--r--vim/config/syntax.vim17
-rw-r--r--vim/config/terminal.vim33
-rw-r--r--vim/config/undo.vim25
-rw-r--r--vim/config/viminfo.vim11
-rw-r--r--vim/config/visual.vim5
-rw-r--r--vim/config/whitespace.vim27
-rw-r--r--vim/config/windows.vim28
-rw-r--r--vim/config/wrap.vim40
27 files changed, 0 insertions, 536 deletions
diff --git a/vim/config/backspace.vim b/vim/config/backspace.vim
deleted file mode 100644
index db842e12..00000000
--- a/vim/config/backspace.vim
+++ /dev/null
@@ -1,8 +0,0 @@
-" Let me backspace over pretty much anything
-set backspace=
-" Allow backspacing over autoindent
-set backspace+=indent
-" Allow backspacing over line breaks
-set backspace+=eol
-" Allow backspacing over the start of the insert operation
-set backspace+=start
diff --git a/vim/config/backup.vim b/vim/config/backup.vim
deleted file mode 100644
index cf2d63ba..00000000
--- a/vim/config/backup.vim
+++ /dev/null
@@ -1,12 +0,0 @@
-" Default to no backup files at all, in a way that even ancient/tiny Vims will
-" understand; the auto_cache_dirs.vim plugin will take care of re-enabling
-" this with a 'backupdir' setting
-set nobackup
-set nowritebackup
-
-" If backups are enabled, use a more explicit and familiar backup suffix
-set backupext=.bak
-
-" Don't back up files in anything named */shm/; they might be password
-" files
-set backupskip+=*/shm/*
diff --git a/vim/config/buffers.vim b/vim/config/buffers.vim
deleted file mode 100644
index b5a0151b..00000000
--- a/vim/config/buffers.vim
+++ /dev/null
@@ -1,14 +0,0 @@
-" Allow jumping between windows and tabs to find an open instance of a given
-" buffer with :sbuffer.
-set switchbuf=useopen
-if v:version >= 701
- set switchbuf+=usetab
-endif
-
-" Cycle back and forth through buffers.
-nnoremap <silent>
- \ [b
- \ :<C-U>bprevious<CR>
-nnoremap <silent>
- \ ]b
- \ :<C-U>bnext<CR>
diff --git a/vim/config/command.vim b/vim/config/command.vim
deleted file mode 100644
index b96987cd..00000000
--- a/vim/config/command.vim
+++ /dev/null
@@ -1,35 +0,0 @@
-" Keep plenty of command and search history, because disk space is cheap
-set history=2000
-
-" Always tell me the number of lines changed by a command
-set report=0
-
-" Command-line based features
-if has('cmdline_info')
-
- " Show my current position in the status bar
- set ruler
-
- " Show the keystrokes being entered in the screen
- set showcmd
-
- " Show the mode we're using if not normal mode (e.g. --INSERT--)
- set showmode
-
-endif
-
-" \d inserts the current local date from date(1)
-nnoremap <silent>
- \ <Leader>d
- \ :<C-U>read !date<CR>
-" \D inserts the current UTC date from date(1)
-nnoremap <silent>
- \ <Leader>D
- \ :<C-U>read !date -u<CR>
-
-" \m in visual/select mode starts a mail message with the selected lines
-vmap <Leader>m <Plug>MailMuttSelected
-" \m in normal mode starts a mail message with the current line
-nmap <Leader>m <Plug>MailMuttLine
-" \M in normal mode starts a mail message with the whole buffer
-nmap <Leader>M <Plug>MailMuttBuffer
diff --git a/vim/config/completion.vim b/vim/config/completion.vim
deleted file mode 100644
index 566a3a7c..00000000
--- a/vim/config/completion.vim
+++ /dev/null
@@ -1,28 +0,0 @@
-" Don't try to complete strings from included files, just use the strings in
-" the open buffers; I'll open the file if I want to complete from it
-set complete-=i
-
-" Configuration for the command completion feature; rather than merely cycling
-" through possible completions with Tab, show them above the command line
-if has('wildmenu')
-
- " Use the wild menu, both completing and showing all possible completions
- " with a single Tab press, just as I've configured Bash to do
- set wildmenu
- set wildmode=list:longest
-
- " Don't complete certain files that I'm not likely to want to manipulate
- " from within Vim:
- if has('wildignore')
- set wildignore+=*.a,*.o
- set wildignore+=*.bmp,*.gif,*.ico,*.jpg,*.png
- set wildignore+=.DS_Store,.git,.hg,.svn
- set wildignore+=*~,*.swp,*.tmp
- endif
-
- " Complete files without case sensitivity, if the option is available
- if exists('+wildignorecase')
- set wildignorecase
- endif
-
-endif
diff --git a/vim/config/digraphs.vim b/vim/config/digraphs.vim
deleted file mode 100644
index 0982d94f..00000000
--- a/vim/config/digraphs.vim
+++ /dev/null
@@ -1,6 +0,0 @@
-" A few very important custom digraphs
-if has('digraphs')
- digraph ./ 8230 " Ellipsis (HORIZONTAL ELLIPSIS U+2026)
- digraph %% 8984 " Mac command key (PLACE OF INTEREST SIGN U+2318)
- digraph 8: 9731 " Snowman (SNOWMAN U+2603)
-endif
diff --git a/vim/config/display.vim b/vim/config/display.vim
deleted file mode 100644
index 8b3bcf24..00000000
--- a/vim/config/display.vim
+++ /dev/null
@@ -1,41 +0,0 @@
-" Set up short message settings
-set shortmess=
-" (file 3 of 5) -> (3 of 5)
-set shortmess+=f
-" [Incomplete last line] -> [eol]
-set shortmess+=i
-" I donated to Uganda, thanks Bram
-set shortmess+=I
-" 999 lines, 888 characters -> 999L, 888C
-set shortmess+=l
-" [Modified] -> [+]
-set shortmess+=m
-" [New File] -> [New]
-set shortmess+=n
-" Don't stack file writing messages
-set shortmess+=o
-" Don't stack file reading messages
-set shortmess+=O
-" [readonly] -> [RO]
-set shortmess+=r
-" Truncate file message at start if too long
-set shortmess+=t
-" Truncate other message in midle if too long
-set shortmess+=T
-" written -> [w], appended -> [a]
-set shortmess+=w
-" [dos format] -> [dos]
-set shortmess+=x
-
-" Don't show whitespace characters or end-of-line characters visually by
-" default, but make \l toggle between them
-set nolist
-nnoremap <silent>
- \ <Leader>l
- \ :<C-U>set list! list?<CR>
-
-" Don't show line numbers by default, but \n toggles them
-set nonumber
-nnoremap <silent>
- \ <Leader>n
- \ :<C-U>set number! number?<CR>
diff --git a/vim/config/dist.vim b/vim/config/dist.vim
deleted file mode 100644
index 0a20be48..00000000
--- a/vim/config/dist.vim
+++ /dev/null
@@ -1,30 +0,0 @@
-" Disable most core plugin stuff that I don't use; after/plugin/dist.vim
-" clears these variables later
-if has('eval')
-
- " 2html.vim is often useful, so keep that
- " matchparen.vim I use constantly
-
- " I handle versioning plugins manually, and have never used .vba
- let g:loaded_getscriptPlugin = 1
- let g:loaded_vimballPlugin = 1
-
- " This is what grep, sed, Awk, and Perl are for
- let g:loaded_logiPat = 1
-
- " ^Z, my dudes
- let g:loaded_netrwPlugin = 1
-
- " Vim servers? What is this, Emacs?
- let g:loaded_rrhelper = 1
-
- " System dictionaries plus custom per-machine spell files are fine
- let g:loaded_spellfile_plugin = 1
-
- " If I want to read a file or a file archived within it I'll decompress or
- " unarchive it myself; a text editor should not do this
- let g:loaded_gzip = 1
- let g:loaded_tarPlugin = 1
- let g:loaded_zipPlugin = 1
-
-endif
diff --git a/vim/config/files.vim b/vim/config/files.vim
deleted file mode 100644
index 61c3b6cb..00000000
--- a/vim/config/files.vim
+++ /dev/null
@@ -1,41 +0,0 @@
-" Load plugins for file types
-if has('autocmd')
- filetype plugin indent on
-endif
-
-" Bind \p to show filetype
-nnoremap <silent>
- \ <Leader>p
- \ :<C-U>set filetype?<CR>
-
-" Use UTF-8 by default wherever possible
-if has('multi_byte')
- set encoding=utf-8
-endif
-
-" Use all ancestors of current directory for :find
-if has('file_in_path')
- set path=**
-endif
-
-" If the Vim buffer for a file doesn't have any changes and Vim detects the
-" file has been altered, quietly update it
-set autoread
-
-" Save a file automatically if I change buffers or perform operations with the
-" argument list; this is particularly helpful for me as I don't use 'hidden'
-set autowrite
-
-" Don't use modelines at all, they're apparently potential security problems
-" and I've never used them anyway
-set nomodeline
-
-" I really like ZZ and ZQ, so I wrote a couple more mappings; ZW forces a
-" write of the current buffer, but doesn't quit, and ZA forces a write of all
-" buffers but doesn't quit
-nnoremap <silent>
- \ ZW
- \ :<C-U>write!<CR>
-nnoremap <silent>
- \ ZA
- \ :<C-U>wall!<CR>
diff --git a/vim/config/format.vim b/vim/config/format.vim
deleted file mode 100644
index 86557a8c..00000000
--- a/vim/config/format.vim
+++ /dev/null
@@ -1,38 +0,0 @@
-" Don't assume a number with a leading zero is octal; it's far more likely a
-" zero-padded decimal, so increment and decrement with ^A and ^X on that basis
-set nrformats-=octal
-
-" Try to set the 'j' flag for 'formatoptions', to automatically delete comment
-" leaders when joining lines
-silent! set formatoptions+=j
-
-" Show the current formatoptions at a glance
-nnoremap <silent>
- \ <Leader>f
- \ :<C-U>setlocal formatoptions?<CR>
-
-" Use toggle_option_flag.vim plugin to bind quick toggle actions for some
-" 'formatoptions' flags
-if has('user_commands')
-
- " a: Reformat paragraphs to 'textwidth' on all insert or delete operations
- nnoremap <silent>
- \ <Leader>a
- \ :<C-U>ToggleOptionFlagLocal formatoptions a<CR>
-
- " c: Reformat comments to 'textwidth'
- nnoremap <silent>
- \ <Leader>c
- \ :<C-U>ToggleOptionFlagLocal formatoptions c<CR>
-
- " j: Delete comment leaders when joining lines
- nnoremap <silent>
- \ <Leader>j
- \ :<C-U>ToggleOptionFlagLocal formatoptions j<CR>
-
- " t: Reformat non-comment text to 'textwidth'
- nnoremap <silent>
- \ <Leader>t
- \ :<C-U>ToggleOptionFlagLocal formatoptions t<CR>
-
-endif
diff --git a/vim/config/match.vim b/vim/config/match.vim
deleted file mode 100644
index 58bcce78..00000000
--- a/vim/config/match.vim
+++ /dev/null
@@ -1,2 +0,0 @@
-" Match all forms of brackets in pairs (including angle brackets)
-set matchpairs+=<:>
diff --git a/vim/config/os.vim b/vim/config/os.vim
deleted file mode 100644
index ff6cadfc..00000000
--- a/vim/config/os.vim
+++ /dev/null
@@ -1,8 +0,0 @@
-" Fedora's default environment adds a few auto commands that I don't like,
-" including the 'return to previous position in buffer' one; fortunately
-" they're nice enough to group the commands, so I can just clear them
-if has('autocmd')
- augroup fedora
- autocmd!
- augroup END
-endif
diff --git a/vim/config/packages.vim b/vim/config/packages.vim
deleted file mode 100644
index f03595eb..00000000
--- a/vim/config/packages.vim
+++ /dev/null
@@ -1,5 +0,0 @@
-" Add the packaged version of matchit.vim included in the distribution, if
-" possible; after/plugin/macros.vim loads this for older Vims
-if has('packages')
- silent! packadd! matchit
-endif
diff --git a/vim/config/registers.vim b/vim/config/registers.vim
deleted file mode 100644
index 01879aa8..00000000
--- a/vim/config/registers.vim
+++ /dev/null
@@ -1,4 +0,0 @@
-" Change and delete with C and D both cut off the remainder of the line from
-" the cursor, but Y yanks the whole line, which is inconsistent (and can be
-" done with yy anyway); this fixes it so it only yanks the rest of the line
-nnoremap Y y$
diff --git a/vim/config/scroll.vim b/vim/config/scroll.vim
deleted file mode 100644
index 73c3dcec..00000000
--- a/vim/config/scroll.vim
+++ /dev/null
@@ -1,8 +0,0 @@
-" Allow the cursor to get to the top or bottom of the screen before scrolling
-" vertically, but set a reasonably wide gutter for scrolling horizontally; no
-" particular reason, just suits me better
-set scrolloff=0
-set sidescrolloff=16
-
-" Rebind <Space> in normal mode as a lazy scroll
-nnoremap <Space> <C-f>
diff --git a/vim/config/search.vim b/vim/config/search.vim
deleted file mode 100644
index fc861801..00000000
--- a/vim/config/search.vim
+++ /dev/null
@@ -1,23 +0,0 @@
-" Some special settings for searching, if available
-if has('extra_search')
-
- " Searching as I enter my pattern, \i toggles this
- set incsearch
- nnoremap <silent>
- \ <Leader>i
- \ :<C-U>set incsearch! incsearch?<CR>
-
- " Highlight search results, \h toggles this
- set hlsearch
- nnoremap <silent>
- \ <Leader>h
- \ :<C-U>set hlsearch! hlsearch?<CR>
-
- " Pressing ^L will clear highlighting until the next search-related
- " operation; quite good because the highlighting gets distracting after
- " you've found what you wanted
- nnoremap <silent>
- \ <C-L>
- \ :<C-U>nohlsearch<CR><C-L>
-
-endif
diff --git a/vim/config/spell.vim b/vim/config/spell.vim
deleted file mode 100644
index cbbe17f1..00000000
--- a/vim/config/spell.vim
+++ /dev/null
@@ -1,21 +0,0 @@
-" Configure spell checking features, if available
-if has('spell')
-
- " Don't check spelling by default, but bind \s to toggle this
- set nospell
- nnoremap <silent>
- \ <Leader>s
- \ :<C-U>setlocal spell! spell?<CR>
-
- " Use New Zealand English for spelling by default (it's almost identical
- " to British English), but bind \u to switch to US English and \z to
- " switch back
- set spelllang=en_nz
- nnoremap <silent>
- \ <Leader>u
- \ :<C-U>setlocal spelllang=en_us spelllang?<CR>
- nnoremap <silent>
- \ <Leader>z
- \ :<C-U>setlocal spelllang=en_nz spelllang?<CR>
-
-endif
diff --git a/vim/config/substitution.vim b/vim/config/substitution.vim
deleted file mode 100644
index 982d25f3..00000000
--- a/vim/config/substitution.vim
+++ /dev/null
@@ -1,11 +0,0 @@
-" Preserve the flags for a pattern when repeating a substitution with &; I
-" don't really understand why this isn't a default, but there it is
-nnoremap <silent>
- \ &
- \ :<C-U>&&<CR>
-
-" Same again for visual mode; we use vnoremap rather than xnoremap to stay
-" compatible with old Vims without doing :execute dances
-vnoremap <silent>
- \ &
- \ :<C-U>&&<CR>
diff --git a/vim/config/swapfile.vim b/vim/config/swapfile.vim
deleted file mode 100644
index de0598c2..00000000
--- a/vim/config/swapfile.vim
+++ /dev/null
@@ -1,15 +0,0 @@
-" Default to no swap files at all, in a way that even ancient/tiny Vims will
-" understand; the auto_cache_dirs.vim plugin will take care of re-enabling
-" this with a 'directory' setting
-set noswapfile
-
-" Don't keep swap files from temporary directories or shared memory in case
-" they're secrets
-if has('autocmd')
- augroup dotfiles_swap_skip
- autocmd!
- autocmd BufNewFile,BufReadPre
- \ /tmp/*,$TMPDIR/*,$TMP/*,$TEMP/*,*/shm/*
- \ setlocal noswapfile
- augroup END
-endif
diff --git a/vim/config/syntax.vim b/vim/config/syntax.vim
deleted file mode 100644
index a2186b1f..00000000
--- a/vim/config/syntax.vim
+++ /dev/null
@@ -1,17 +0,0 @@
-" Options dependent on the syntax feature
-if has('syntax') && !has('g:syntax_on')
-
- " Use syntax highlighting with 100 lines of context
- silent! syntax enable
- silent! syntax sync minlines=100
-
- " Opinionated; if the author is using color at all, it will probably be with
- " a dark background
- set background=dark
-
- " The 'sahara' colorscheme only works in the GUI or with 256 colors
- if has('gui_running') || &t_Co >= 256
- silent! colorscheme sahara
- endif
-
-endif
diff --git a/vim/config/terminal.vim b/vim/config/terminal.vim
deleted file mode 100644
index 04ec5653..00000000
--- a/vim/config/terminal.vim
+++ /dev/null
@@ -1,33 +0,0 @@
-" Start paste mode with F10 to prevent console Vim from confusing a swathe of
-" pre-formatted pasted text with actual keyboard input, and thereby attempting
-" to indent it inappropriately. If unimpaired.vim is available, it's generally
-" nicer to use yo or yO.
-set nopaste
-set pastetoggle=<F10>
-
-" Don't bother about checking whether Escape is being used as a means to enter
-" a Meta-key combination, just register Escape immediately
-if exists('+esckeys')
- set noesckeys
-endif
-
-" Don't bother drawing the screen while executing macros or other automated or
-" scripted processes, just draw the screen as it is when the operation
-" completes
-set lazyredraw
-
-" Improve redrawing smoothness by assuming that my terminal is reasonably
-" fast
-set ttyfast
-
-" Never use any kind of bell, visual or not
-set visualbell t_vb=
-
-" Require less than one second between keys for mappings to work correctly
-set timeout
-set timeoutlen=1000
-
-" Require less than a twentieth of a second between keys for key codes to work
-" correctly; I don't use Escape as a meta key anyway
-set ttimeout
-set ttimeoutlen=50
diff --git a/vim/config/undo.vim b/vim/config/undo.vim
deleted file mode 100644
index b9186d6f..00000000
--- a/vim/config/undo.vim
+++ /dev/null
@@ -1,25 +0,0 @@
-" Rebind Ctrl-C in insert mode to undo the current insert operation
-inoremap <C-c> <C-c>u
-
-" Keep screeds of undo history
-set undolevels=2000
-
-" 'undodir' and 'undofile' settings will be taken care of by the
-" auto_cache_dirs.vim plugin if applicable/possible
-if has('persistent_undo')
-
- " Turn off the option by default
- set noundofile
-
- " Don't keep undo files from temporary directories or shared memory in case
- " they're secrets
- if has('autocmd')
- augroup dotfiles_undo_skip
- autocmd!
- autocmd BufWritePre
- \ /tmp/*,$TMPDIR/*,$TMP/*,$TEMP/*,*/shm/*
- \ setlocal noundofile
- augroup END
- endif
-
-endif
diff --git a/vim/config/viminfo.vim b/vim/config/viminfo.vim
deleted file mode 100644
index 9b01adc3..00000000
--- a/vim/config/viminfo.vim
+++ /dev/null
@@ -1,11 +0,0 @@
-" Don't keep .viminfo information for files in temporary directories or shared
-" memory filesystems; this is because they're used as scratch spaces for tools
-" like sudoedit(8) and pass(1) and hence could present a security problem
-if has('viminfo') && has('autocmd')
- augroup dotfiles_viminfo_skip
- autocmd!
- autocmd BufNewFile,BufReadPre
- \ /tmp/*,$TMPDIR/*,$TMP/*,$TEMP/*,*/shm/*
- \ setlocal viminfo=
- augroup END
-endif
diff --git a/vim/config/visual.vim b/vim/config/visual.vim
deleted file mode 100644
index 8bac2cf1..00000000
--- a/vim/config/visual.vim
+++ /dev/null
@@ -1,5 +0,0 @@
-" When in visual block mode, let me move the cursor anywhere in the buffer;
-" don't restrict me only to regions with text
-if has('virtualedit')
- set virtualedit+=block
-endif
diff --git a/vim/config/whitespace.vim b/vim/config/whitespace.vim
deleted file mode 100644
index fd20e7e5..00000000
--- a/vim/config/whitespace.vim
+++ /dev/null
@@ -1,27 +0,0 @@
-" Adopt the indent of the last line on new lines
-set autoindent
-
-" Use spaces instead of tabs
-set expandtab
-
-" Indent with four spaces when an indent operation is used
-set shiftwidth=4
-
-" Insert four spaces when Tab is pressed
-set softtabstop=4
-
-" When indenting lines with < or >, round the indent to a multiple of
-" 'shiftwidth', so even if the line is indented by one space it will indent
-" up to 4 and down to 0, for example
-set shiftround
-
-" Don't join lines with two spaces at the end of sentences; I don't two-space,
-" despite the noble Steve Losh's exhortations
-set nojoinspaces
-
-" \x strips trailing whitespace via a custom plugin
-nmap <Leader>x <Plug>StripTrailingWhitespace
-
-" Insert blank lines above and below via a custom plugin
-nmap [<Space> <Plug>PutBlankLinesAbove
-nmap ]<Space> <Plug>PutBlankLinesBelow
diff --git a/vim/config/windows.vim b/vim/config/windows.vim
deleted file mode 100644
index 88b38f8c..00000000
--- a/vim/config/windows.vim
+++ /dev/null
@@ -1,28 +0,0 @@
-" Configuration for window features
-if has('windows')
-
- " Show the status in a distinct bar above the command line only if there's
- " more than one window on the screen or in the current tab
- set laststatus=1
-
- " Don't resize windows we're not splitting (Tmux-like; think Mondrian)
- set noequalalways
-
- " New split windows appear below or to the right of the existing window,
- " not above or to the left per the default
- set splitbelow
- if has('vertsplit')
- set splitright
- endif
-
- " Only show the tab bar if there's more than one tab
- if exists('+showtabline')
- set showtabline=1
- endif
-
- " Get rid of visually noisy folding characters
- if has('folding')
- let &fillchars = 'diff: ,fold: ,vert: '
- endif
-
-endif
diff --git a/vim/config/wrap.vim b/vim/config/wrap.vim
deleted file mode 100644
index a2d442fa..00000000
--- a/vim/config/wrap.vim
+++ /dev/null
@@ -1,40 +0,0 @@
-" Don't wrap by default, but use \w to toggle it on or off quickly
-set nowrap
-nnoremap <silent>
- \ <Leader>w
- \ :<C-U>set wrap! wrap?<CR>
-
-" When wrapping text, if a line is so long that not all of it can be shown on
-" the screen, show as much as possible anyway; by default Vim fills the left
-" column with @ symbols instead, which I don't find very helpful
-set display=lastline
-
-" Clearly show when the start or end of the row does not correspond to the
-" start and end of the line
-set listchars+=precedes:<,extends:>
-
-" When wrapping, j and k should move by screen row, and not to the same
-" column number in the previous logical line, which feels very clumsy and is
-" seldom particularly helpful; you can use n| to jump to the nth column in a
-" line anyway if you need to
-nnoremap j gj
-nnoremap k gk
-
-" Line break settings and mappings
-if has('linebreak')
-
- " Break lines at word boundaries if possible
- set linebreak
-
- " Precede continued lines with '...'
- set showbreak=...
-
- " If we have the option, indent wrapped lines as much as the first line
- if exists('+breakindent')
- set breakindent
- endif
-
- " \b toggles copy-pasteable linebreak settings
- nmap <Leader>b <Plug>CopyLinebreakToggle
-
-endif