Skip to content
Browse files

make vim config more system independent

  • Loading branch information...
1 parent 1bba3f6 commit 6afad3a10bb48659562899efc3a58b25acf9f696 @jceb committed
Showing with 22 additions and 18 deletions.
  1. +5 −2 config/keybindings.vim
  2. +2 −2 config/plugin_config.vim
  3. +1 −6 config/plugin_manager.vim
  4. +14 −8 vimrc
View
7 config/keybindings.vim
@@ -44,8 +44,8 @@ let maplocalleader = ','
" disable <F1> mapping to open vim help - especially on Lenovo laptops <F1> is
" in the way of <Esc> which is really annoying
-imap <F1> <Esc>a
-nmap <F1> :echo<CR>
+imap <F1> <Nop>
+map <F1> <Nop>
" fast quit without saving anything
nnoremap <silent> ZQ :qa!<CR>
@@ -90,3 +90,6 @@ nmap - ge
" browse through files
nnoremap <C-n> :bn<CR>
nnoremap <C-p> :bp<CR>
+
+" fast access to the shell
+nnoremap <leader><leader> :!
View
4 config/plugin_config.vim
@@ -184,9 +184,9 @@ inoremap <C-c> <C-o>:call NERDComment(0, "insert")<CR>
" ------------------------------------------------------------
" NERDTree:
nnoremap <leader>e :silent! LL NERDtree<CR>:NERDTreeToggle<CR>
-nnoremap <leader>fe :silent! LL NERDtree<CR>:NERDTreeFind<CR>
+nnoremap <leader>E :silent! LL NERDtree<CR>:NERDTreeFind<CR>
" integrate with cdargs
-let g:NERDTreeBookmarksFile = $HOME.'/.cdargs'
+let g:NERDTreeBookmarksFile = $HOME.g:sep.'.cdargs'
let g:NERDTreeIgnore = ['\.pyc$', '\~$']
" ------------------------------------------------------------
View
7 config/plugin_manager.vim
@@ -6,13 +6,8 @@ if exists('g:vimrc_plugins_loaded')
endif
let g:vimrc_plugins_loaded = 1
-" global variables to make life easier when dealing with different
-" system environments
-let g:sep = pathogen#separator()
-let g:vimdir = '~'.g:sep.(has('unix') ? '.vim' : 'vimfiles')
-
"filetype off " deactivate filetype auto detection before loading bundles to force a reload (this decreases startup time a lot!)
call pathogen#infect(g:vimdir.g:sep.'bundle')
-call ipi#inspect(g:vimdir.sep.'ipi')
+call ipi#inspect(g:vimdir.g:sep.'ipi')
filetype plugin indent on " activate filetype auto detection, automatically load filetypeplugins, indent according to the filetype
View
22 vimrc
@@ -1,27 +1,33 @@
" Author: Jan Christoph Ebersbach jceb AT e-jc DOT de
+" global variables to make life easier when dealing with different
+" system environments
+let g:sep = pathogen#separator()
+let g:vimdir = '~'.g:sep.(has('unix') ? '.vim' : 'vimfiles')
+let g:vimconfigdir = g:vimdir.g:sep.'config'
+
" ToC - use UTL to jump to the entries
" <url:~/.vim/config/plugin_config.vim#tn=Plugin Settings:>
-source $HOME/.vim/config/plugin_config.vim
+exec 'source '.g:vimconfigdir.g:sep.'plugin_config.vim'
" <url:~/.vim/config/plugin_manager.vim#tn=Plugin Manager:>
-source $HOME/.vim/config/plugin_manager.vim
+exec 'source '.g:vimconfigdir.g:sep.'plugin_manager.vim'
" <url:~/.vim/config/settings.vim#tn=Global Settings:>
" <url:~/.vim/config/settings.vim#tn=Miscellaneous Settings:>
" <url:~/.vim/config/settings.vim#tn=Visual Settings:>
" <url:~/.vim/config/settings.vim#tn=Text Settings:>
-source $HOME/.vim/config/settings.vim
+exec 'source '.g:vimconfigdir.g:sep.'settings.vim'
" <url:~/.vim/config/keybindings.vim#tn=Keymappings:>
" <url:~/.vim/config/keybindings.vim#tn=Changes To The Default Behavior:>
-source $HOME/.vim/config/keybindings.vim
+exec 'source '.g:vimconfigdir.g:sep.'keybindings.vim'
" <url:~/.vim/config/commands.vim#tn=Commands:>
-source $HOME/.vim/config/commands.vim
+exec 'source '.g:vimconfigdir.g:sep.'commands.vim'
" <url:~/.vim/config/auto_commands.vim#tn=Autocommands:>
-source $HOME/.vim/config/auto_commands.vim
+exec 'source '.g:vimconfigdir.g:sep.'auto_commands.vim'
-" Personal Settings:
-source $HOME/.vim/config/personal.vim
+" <url:~/.vim/config/personal.vim#tn=Personal Settings:>
+exec 'source '.g:vimconfigdir.g:sep.'personal.vim'

0 comments on commit 6afad3a

Please sign in to comment.
Something went wrong with that request. Please try again.