diff --git a/sources_forked/jshint.vim b/sources_forked/jshint.vim new file mode 160000 index 00000000..b7eee842 --- /dev/null +++ b/sources_forked/jshint.vim @@ -0,0 +1 @@ +Subproject commit b7eee8428170eb280281ee1451a07a4bbb03e859 diff --git a/sources_forked/syntastic b/sources_forked/syntastic new file mode 160000 index 00000000..40ac6c46 --- /dev/null +++ b/sources_forked/syntastic @@ -0,0 +1 @@ +Subproject commit 40ac6c462e2f76cb76d8a0f295abc358abc198bb diff --git a/vimrcs/basic.vim b/vimrcs/basic.vim index 6c1d423c..06e98ee8 100644 --- a/vimrcs/basic.vim +++ b/vimrcs/basic.vim @@ -84,9 +84,9 @@ set wildmenu " Ignore compiled files set wildignore=*.o,*~,*.pyc if has("win16") || has("win32") - set wildignore+=.git\*,.hg\*,.svn\* -else set wildignore+=*/.git/*,*/.hg/*,*/.svn/*,*/.DS_Store +else + set wildignore+=.git\*,.hg\*,.svn\* endif "Always show current position @@ -153,12 +153,15 @@ if $COLORTERM == 'gnome-terminal' endif try - colorscheme desert + colorscheme peaksea catch endtry set background=dark +"jsx highlighting +let g:jsx_ext_required = 0 + " Set extra options when running in GUI mode if has("gui_running") set guioptions-=T @@ -193,8 +196,8 @@ set expandtab set smarttab " 1 tab == 4 spaces -set shiftwidth=4 -set tabstop=4 +set shiftwidth=2 +set tabstop=1 " Linebreak on 500 characters set lbr @@ -217,6 +220,10 @@ vnoremap # :call VisualSelection('', '')?=@/ """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " => Moving around, tabs, windows and buffers """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" Treat long lines as break lines (useful when moving around in them) +map j gj +map k gk + " Map to / (search) and Ctrl- to ? (backwards search) map / map ? diff --git a/vimrcs/extended.vim b/vimrcs/extended.vim index 499959a2..adfe18eb 100644 --- a/vimrcs/extended.vim +++ b/vimrcs/extended.vim @@ -21,15 +21,22 @@ elseif has("unix") set gfn=Monospace\ 11 endif +" Open MacVim in fullscreen mode +if has("gui_macvim") + set fuoptions=maxvert,maxhorz + au GUIEnter * set fullscreen +endif + " Disable scrollbars (real hackers don't use scrollbars for navigation!) -set guioptions-=r +set guioptions+=r set guioptions-=R set guioptions-=l set guioptions-=L +set mouse=a " Colorscheme set background=dark -colorscheme peaksea +colorscheme ir_black """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" @@ -78,6 +85,7 @@ imap ½ $ """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +cnoremap " => Parenthesis/bracket """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" vnoremap $1 `>a)` @@ -135,3 +143,12 @@ endfunc func! CurrentFileDir(cmd) return a:cmd . " " . expand("%:p:h") . "/" endfunc + +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" => BJORN BJORN BJORN +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +:imap jk + +:set relativenumber +:set number +let g:syntastic_javascript_checkers = ['eslint'] diff --git a/vimrcs/filetypes.vim b/vimrcs/filetypes.vim index 8c4eb9db..2384cba2 100644 --- a/vimrcs/filetypes.vim +++ b/vimrcs/filetypes.vim @@ -17,15 +17,12 @@ au FileType python map 1 /class au FileType python map 2 /def au FileType python map C ?class au FileType python map D ?def -au FileType python set cindent -au FileType python set cinkeys-=0# -au FileType python set indentkeys-=0# """""""""""""""""""""""""""""" " => JavaScript section """"""""""""""""""""""""""""""" -au FileType javascript call JavaScriptFold() +"au FileType javascript call JavaScriptFold() au FileType javascript setl fen au FileType javascript setl nocindent @@ -35,33 +32,15 @@ au FileType javascript imap alert();hi au FileType javascript inoremap $r return au FileType javascript inoremap $f //--- PHFP2xi -function! JavaScriptFold() - setl foldmethod=syntax - setl foldlevelstart=1 - syn region foldBraces start=/{/ end=/}/ transparent fold keepend extend - - function! FoldText() - return substitute(getline(v:foldstart), '{.*', '{...}', '') - endfunction - setl foldtext=FoldText() -endfunction +"function! JavaScriptFold() +" setl foldmethod=syntax +" setl foldlevelstart=99 +" syn region foldBraces start=/{/ end=/}/ transparent fold keepend extend +" +" function! FoldText() +" return substitute(getline(v:foldstart), '{.*', '{...}', '') +" endfunction +" setl foldtext=FoldText() +"endfunction -"""""""""""""""""""""""""""""" -" => CoffeeScript section -""""""""""""""""""""""""""""""" -function! CoffeeScriptFold() - setl foldmethod=indent - setl foldlevelstart=1 -endfunction -au FileType coffee call CoffeeScriptFold() - -au FileType gitcommit call setpos('.', [0, 1, 1, 0]) - - -"""""""""""""""""""""""""""""" -" => Shell section -"""""""""""""""""""""""""""""" -if exists('$TMUX') - set term=screen-256color -endif diff --git a/vimrcs/plugins_config.vim b/vimrcs/plugins_config.vim index 44d761cb..448567fb 100644 --- a/vimrcs/plugins_config.vim +++ b/vimrcs/plugins_config.vim @@ -73,11 +73,11 @@ set grepprg=/bin/grep\ -nH """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " => Nerd Tree """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" -let g:NERDTreeWinPos = "right" +let g:NERDTreeWinPos = "left" let NERDTreeShowHidden=0 let NERDTreeIgnore = ['\.pyc$', '__pycache__'] let g:NERDTreeWinSize=35 -map nn :NERDTreeToggle +map m :NERDTreeToggle map nb :NERDTreeFromBookmark map nf :NERDTreeFind @@ -85,8 +85,7 @@ map nf :NERDTreeFind """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " => vim-multiple-cursors """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" -let g:multi_cursor_next_key="\" - +let g:multi_cursor_next_key='' """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " => surround.vim config @@ -159,7 +158,10 @@ func! SyntasticCheckCoffeescript() execute "SyntasticCheck" execute "Errors" endfunc -nnoremap c :call SyntasticCheckCoffeescript() +nnoremap l :call SyntasticCheckCoffeescript() +let g:syntastic_mode_map = { + \ "mode": "active", + \ "passive_filetypes": ["html"] } """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""