summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2015-01-30 11:40:04 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2015-01-30 11:40:04 +0100
commit64b0edf177190f32aed80815fa05063bb5f1aee6 (patch)
tree1590858c13446ac54996b540527d4fc40976d851
parentd31f530530921ec9eb70e3c8d11c34fc393ab2bb (diff)
downloadvim-64b0edf177190f32aed80815fa05063bb5f1aee6.zip
vim-64b0edf177190f32aed80815fa05063bb5f1aee6.tar.gz
vimrc: remove unused crap, add p -> "_dP
-rw-r--r--vimrc25
1 files changed, 5 insertions, 20 deletions
diff --git a/vimrc b/vimrc
index bb18c11..629fb06 100644
--- a/vimrc
+++ b/vimrc
@@ -103,14 +103,14 @@ map <C-c> \\\
nmap <C-r> g<C-]>
inoremap <C-x> <C-X><C-]>
-" Don't use Ex mode, use Q for formatting
-map Q gq
-
" code completion
inoremap <C-d> <C-X><C-]>
-" Make p in Visual mode replace the selected text with the "" register.
-vnoremap p <Esc>:let current_reg = @"<CR>gvs<C-R>=current_reg<CR><Esc>
+" replace current selection with content of "" buffer
+vmap p "_dP
+
+" Don't use Ex mode, use Q for formatting
+map Q gq
" Only do this part when compiled with support for autocommands.
if has("autocmd")
@@ -163,20 +163,5 @@ if has("autocmd")
endif " has("autocmd")
-function! Preserve(command)
- " Preparation: save last search, and cursor position.
- let _s=@/
- let l = line(".")
- let c = col(".")
- " Do the business:
- execute a:command
- " Clean up: restore previous search history, and cursor position
- let @/=_s
- call cursor(l, c)
- endfunction
-nmap _$ :call Preserve("%s/\\s\\+$//e")<CR>
-nmap _= :call Preserve("normal gg=G")<CR>
-" autocmd BufWritePre * :call Preserve("%s/\\s\\+$//e")
-
source ~/.vim/scripts/bepo-layout.vim