Permalink
Browse files

Merge branch 'master' of github.com:graudeejs/dot.vim

  • Loading branch information...
2 parents 8e2e06e + 467e3d1 commit a4e82f32b62730158b21a0e9108d823c830adc75 @graudeejs committed Jul 30, 2012
Showing with 22 additions and 23 deletions.
  1. +22 −23 vimrc
View
@@ -385,13 +385,6 @@ if whoami != 'root'
let g:vimball_home= realhome . "/.vim/bundle/vimball"
" }}}
- " netrw {{{
-
- " I don't use it, so let's disable it
- let g:loaded_netrw = 1
- let g:loaded_netrwPlugin = 1
-
- "}}}
" Ack {{{
if ProgrPath(['ack']) == ''
@@ -592,10 +585,10 @@ nmap <C-A> <ESC>:buffers<cr>:buffer<Space>
nmap <C-A>n <ESC>:next<cr>
nmap <C-A>p <ESC>:previous<cr>
-" nmap <Left> <ESC>:next<cr>
-" nmap <Right> <ESC>:previous<cr>
-" nmap <Up> <ESC>:tabnext<cr>
-" nmap <Down> <ESC>:tabprevious<cr>
+nmap <Left> <ESC>:previous<cr>
+nmap <Right> <ESC>:next<cr>
+nmap <Up> <ESC>:tabnext<cr>
+nmap <Down> <ESC>:tabprevious<cr>
noremap ; l
noremap l k
noremap k j
@@ -650,12 +643,17 @@ elseif exists("$DISPLAY") && exists("$XAUTHORITY") && filereadable($XAUTHORITY)
nmap <silent> <F3> <ESC>:r!xclip -o -selection clipboard<CR>
imap <silent> <F3> <ESC>:r!xclip -o -selection clipboard<CR>
else
- vmap <F2> "vy
- nmap <F2> <ESC>"vp
- imap <F2> <ESC>"vp
- vmap <F3> "zy
- nmap <F3> <ESC>"zp
- imap <F3> <ESC>"zp
+ " vmap <F2> :execute 'write ' . vim_tmp . '/clip1'
+ " nmap <F2> <ESC>:execute 'read ' . vim_tmp . '/clip1'
+ vmap <F2> :write ~/.vim_clip1
+ nmap <F2> <ESC>:read ~/.vim_clip1
+ imap <F2> <ESC>:read ~/.vim_clip1
+
+ " nmap <F3> <ESC>:execute 'read ' . vim_tmp . '/clip2'
+ " imap <F3> <ESC>:execute 'read ' . vim_tmp . '/clip2'
+ vmap <F3> :write ~/.vim_clip2
+ nmap <F3> <ESC>:read ~/.vim_clip2
+ imap <F3> <ESC>:read ~/.vim_clip2
endif
" F1 is mapped by ftplugins
@@ -674,12 +672,9 @@ if whoami != 'root'
nmap <S-F8> <ESC>:call LoadIfNeeded(['tagbar'])<CR>:TagbarOpenAutoClose<CR>
nmap <F9> <ESC>:GundoToggle<CR>
endif
-" F9
" F10
-" F11
-nmap <F12> <ESC>:execute 'mksession! ' . project_file_name<CR>
-nmap d<F12> <ESC>:execute 'silent ! rm -f ' . project_file_name<CR>
-nmap <S-F12> <ESC>:execute 'source ' . project_file_name<CR>
+nmap <F11> <ESC>:set number!<CR>
+nmap <F12> <ESC>:set relativenumber!<CR>
if whoami != 'root'
if filereadable(project_file_name)
@@ -691,11 +686,15 @@ if whoami != 'root'
endif
+" disable syntax hilighting for files over 4MB
+" jump to previously edited file on buffer read
au BufReadPost * if getfsize(bufname("%")) > 4*1024*1024 |
\ set syntax= |
+\ endif |
+\ if line("'\"") > 0 && line("'\"") <= line("$") |
+\ exe "normal! g`\"" |
\ endif
-
if executable("/bin/sh")
set shell=/bin/sh
let &viewdir = vim_var . '/view'

0 comments on commit a4e82f3

Please sign in to comment.