Skip to content

Commit

Permalink
Fixed some cross platform issues
Browse files Browse the repository at this point in the history
  • Loading branch information
lyphtec committed Mar 28, 2014
1 parent df9b090 commit fd66313
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 8 deletions.
17 changes: 12 additions & 5 deletions init/keybindings.vim
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,22 @@ nmap <silent> \n :set invhls<CR>:set hls?<CR> " Turn off that stupid hig
nmap <silent> <Space> :set invhls<CR>:set hls?<CR>
nmap <silent> \w :set invwrap<CR>:set wrap?<CR> " set text wrapping toggles
map <silent> <F12> :set invlist<CR> " F12 to switch display of unprintable characters
nmap <silent> \ev :e ~/_vimrc<CR> " Edit the vimrc file
nmap <silent> \cd :lcd %:h<CR> " cd to the directory containing the file in the buffer
map <silent> <F12> :set invlist<CR> " F12 to switch display of unprintable characters
" Edit the vimrc file
if has('win32')
nmap <silent> \ev :e ~/vimfiles/vimrc<CR>
else
nmap <silent> \ev :e ~/.vimrc<CR>
endif

nmap <silent> \cd :lcd %:h<CR> " cd to the directory containing the file in the buffer
nmap <silent> \md :!mkdir -p %:p:h<CR>
nmap <silent> \p "*p<CR> " Paste from clipboard
nmap <silent> \p "*p<CR> " Paste from clipboard
nmap <silent> <C-P> "*p<CR>
imap <S-Space> <Esc> " Shift-Space in insert mode goes back to normal mode
imap <S-Space> <Esc> " Shift-Space in insert mode goes back to normal mode
" Make Control-direction switch between windows (like C-W h, etc)
nmap <silent> <C-k> <C-W><C-k>
Expand Down
9 changes: 6 additions & 3 deletions init/options.vim
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,12 @@ set splitbelow
set splitright

set nolist " don't display unprintable characters, f12 - switches
set listchars=tab:\ ·,eol
set listchars+=trail:·
set listchars+=extends:»,precedes:«
" only good for gVim
if has('gui_running')
set listchars=tab:\ ·,eol
set listchars+=trail:·
set listchars+=extends:»,precedes:«
endif
map <silent> <F12> :set invlist<CR>
set lazyredraw " Don't update the display while executing macros
Expand Down

0 comments on commit fd66313

Please sign in to comment.