Skip to content

Commit

Permalink
vim settings
Browse files Browse the repository at this point in the history
  • Loading branch information
Guillaume Frichet committed Mar 26, 2016
1 parent 2653d47 commit 61723db
Show file tree
Hide file tree
Showing 13 changed files with 13 additions and 9 deletions.
2 changes: 1 addition & 1 deletion vim/settings.vim → vim/plugin/settings.vim
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

" github.com/skwp/dotfiles/blob/master/vim/settings.vim

let vimsettings = '~/.vim/settings'
let vimsettings = '~/.vim/plugin/settings'
"let uname = system("uname -s")

for fpath in split(globpath(vimsettings, '*.vim'), '\n')
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
20 changes: 12 additions & 8 deletions vim/vimrc
Original file line number Diff line number Diff line change
Expand Up @@ -521,8 +521,8 @@ command! Fr set spelllang=fr
" Allow backspace in insert mode
set backspace=indent,eol,start

" Change leader to a comma instead of backslash
let g:mapleader=","
" Change leader
let g:mapleader="\<Space>"

" Nope
nnoremap <up> <nop>
Expand All @@ -534,7 +534,7 @@ inoremap <down> <nop>
inoremap <left> <nop>
inoremap <right> <nop>
" Move by screen lines (use virtual columns)
" Move vertically on wrapped lines
nnoremap j gj
nnoremap k gk
Expand All @@ -544,9 +544,6 @@ nnoremap <C-j> <C-w>j
nnoremap <C-k> <C-w>k
nnoremap <C-l> <C-w>l
" Clear highlighted search results
map <leader><Space> :noh<CR>
" Edit in the same directory as the current file
cnoremap %% <C-R>=fnameescape(expand('%:h')).'/'<cr>
" Edit in window
Expand All @@ -558,9 +555,16 @@ map <leader>ev :vsp %%
" Edit in tab
map <leader>et :tabe %%
" Save a file as root (,W)
" Quicker quit
noremap <leader>q :q<CR>
" Save a file
noremap <leader>w :w<CR>
" Save as root (,W)
noremap <leader>W :w !sudo tee % > /dev/null<CR>
" Clear highlighted search results
map <leader><Space> :noh<CR>
" Git shortcuts
map <leader>b :Gblame<cr>
map <leader>l :!clear && git log -p %<CR>
Expand All @@ -578,4 +582,4 @@ nnoremap <leader>rc <C-w><C-v><C-l>:e $MYVIMRC<CR>
" Runtime {{{1

" Load custom settings
runtime settings.vim
" runtime plugin/settings.vim

0 comments on commit 61723db

Please sign in to comment.