aboutsummaryrefslogtreecommitdiff
path: root/vim/config
diff options
context:
space:
mode:
Diffstat (limited to 'vim/config')
-rw-r--r--vim/config/backspace.vim11
-rw-r--r--vim/config/completion.vim2
-rw-r--r--vim/config/format.vim2
-rw-r--r--vim/config/search.vim18
-rw-r--r--vim/config/whitespace.vim7
5 files changed, 12 insertions, 28 deletions
diff --git a/vim/config/backspace.vim b/vim/config/backspace.vim
index a4089a68..db842e12 100644
--- a/vim/config/backspace.vim
+++ b/vim/config/backspace.vim
@@ -1,3 +1,8 @@
-" Let me backspace over pretty much anything, even if it's not text I inserted
-" in the current session
-set backspace=indent,eol,start
+" 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/completion.vim b/vim/config/completion.vim
index a8a5c201..566a3a7c 100644
--- a/vim/config/completion.vim
+++ b/vim/config/completion.vim
@@ -9,7 +9,7 @@ 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=longest:list
+ set wildmode=list:longest
" Don't complete certain files that I'm not likely to want to manipulate
" from within Vim:
diff --git a/vim/config/format.vim b/vim/config/format.vim
index 97ebcb11..86557a8c 100644
--- a/vim/config/format.vim
+++ b/vim/config/format.vim
@@ -7,7 +7,7 @@ set nrformats-=octal
silent! set formatoptions+=j
" Show the current formatoptions at a glance
-noremap <silent>
+nnoremap <silent>
\ <Leader>f
\ :<C-U>setlocal formatoptions?<CR>
diff --git a/vim/config/search.vim b/vim/config/search.vim
index 69f3f472..fc861801 100644
--- a/vim/config/search.vim
+++ b/vim/config/search.vim
@@ -5,13 +5,13 @@ if has('extra_search')
set incsearch
nnoremap <silent>
\ <Leader>i
- \ :<C-U>setlocal incsearch! incsearch?<CR>
+ \ :<C-U>set incsearch! incsearch?<CR>
" Highlight search results, \h toggles this
set hlsearch
nnoremap <silent>
\ <Leader>h
- \ :<C-U>setlocal hlsearch! hlsearch?<CR>
+ \ :<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
@@ -20,18 +20,4 @@ if has('extra_search')
\ <C-L>
\ :<C-U>nohlsearch<CR><C-L>
- " Clear search highlighting as soon as I enter insert mode, and restore it
- " once I leave it
- if has('autocmd') && v:version >= 701
- augroup dotfiles_highlight
- autocmd!
- autocmd InsertEnter
- \ *
- \ setlocal nohlsearch
- autocmd InsertLeave
- \ *
- \ setlocal hlsearch
- augroup END
- endif
-
endif
diff --git a/vim/config/whitespace.vim b/vim/config/whitespace.vim
index 12d41a4e..981def81 100644
--- a/vim/config/whitespace.vim
+++ b/vim/config/whitespace.vim
@@ -24,12 +24,5 @@ set shiftround
" despite the noble Steve Losh's exhortations
set nojoinspaces
-" Rebind normal J to run plugin-defined join that doesn't jump around, but
-" only if we have the eval feature, because otherwise this mapping won't exist
-" and we should keep the default behaviour
-if has('eval')
- nmap J <Plug>FixedJoin
-endif
-
" \x strips trailing whitespace via a custom plugin
nmap <Leader>x <Plug>StripTrailingWhitespace