aboutsummaryrefslogtreecommitdiffstats
path: root/.vimrc
diff options
context:
space:
mode:
authorshmibs <shmibs@gmail.com>2014-01-06 10:16:16 -0700
committershmibs <shmibs@gmail.com>2014-01-06 10:16:16 -0700
commiteb52ab2616e8e004499333656307d01c45c369ef (patch)
treea704f4c2abbfabb4dd2867cd333db48b3e323811 /.vimrc
downloaddotfiles-eb52ab2616e8e004499333656307d01c45c369ef.tar.gz
initial commit
Diffstat (limited to '.vimrc')
-rw-r--r--.vimrc34
1 files changed, 34 insertions, 0 deletions
diff --git a/.vimrc b/.vimrc
new file mode 100644
index 0000000..ae5d7ec
--- /dev/null
+++ b/.vimrc
@@ -0,0 +1,34 @@
+syntax on
+filetype plugin on
+set autoindent
+
+"tab controls to match pentadactyl
+map <C-n> <Esc>:tabn<CR>
+map <C-p> <Esc>:tabp<CR>
+map <C-t> <Esc>:tabnew<CR>
+
+"insert lines above and below with (=|+)
+nnoremap = O<Esc>j
+nnoremap + O<Esc>
+
+"copy words from above and below the cursor
+inoremap <expr> <c-y> pumvisible() ? "\<c-y>" : matchstr(getline(line('.')-1), '\%' . virtcol('.') . 'v\%(\k\+\\|.\)')
+inoremap <expr> <c-e> pumvisible() ? "\<c-e>" : matchstr(getline(line('.')+1), '\%' . virtcol('.') . 'v\%(\k\+\\|.\)')
+
+"use the X clipboard for things when running in a virtual terminal, because yes
+if &term != "linux"
+ nnoremap <expr> y (v:register ==# '"' ? '"+' : '') . 'y'
+ nnoremap <expr> Y (v:register ==# '"' ? '"+' : '') . 'Y'
+ xnoremap <expr> y (v:register ==# '"' ? '"+' : '') . 'y'
+ xnoremap <expr> Y (v:register ==# '"' ? '"+' : '') . 'Y'
+
+ nnoremap <expr> d (v:register ==# '"' ? '"+' : '') . 'd'
+ nnoremap <expr> D (v:register ==# '"' ? '"+' : '') . 'D'
+ xnoremap <expr> d (v:register ==# '"' ? '"+' : '') . 'd'
+ xnoremap <expr> D (v:register ==# '"' ? '"+' : '') . 'D'
+
+ nnoremap <expr> p (v:register ==# '"' ? '"+' : '') . 'p'
+ nnoremap <expr> P (v:register ==# '"' ? '"+' : '') . 'P'
+ xnoremap <expr> p (v:register ==# '"' ? '"+' : '') . 'p'
+ xnoremap <expr> P (v:register ==# '"' ? '"+' : '') . 'P'
+end