1
0
Fork 0
mirror of synced 2024-11-16 14:05:34 -05:00
This commit is contained in:
Bjorn Johnson 2017-01-17 22:44:53 +00:00 committed by GitHub
commit d23c665a61
6 changed files with 51 additions and 44 deletions

@ -0,0 +1 @@
Subproject commit b7eee8428170eb280281ee1451a07a4bbb03e859

@ -0,0 +1 @@
Subproject commit 40ac6c462e2f76cb76d8a0f295abc358abc198bb

View file

@ -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 <silent> # :<C-u>call VisualSelection('', '')<CR>?<C-R>=@/<CR><CR>
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => 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 <Space> to / (search) and Ctrl-<Space> to ? (backwards search)
map <space> /
map <c-space> ?

View file

@ -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 <C-E> <End>
" => Parenthesis/bracket
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
vnoremap $1 <esc>`>a)<esc>`<i(<esc>
@ -135,3 +143,12 @@ endfunc
func! CurrentFileDir(cmd)
return a:cmd . " " . expand("%:p:h") . "/"
endfunc
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => BJORN BJORN BJORN
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
:imap jk <Esc>
:set relativenumber
:set number
let g:syntastic_javascript_checkers = ['eslint']

View file

@ -17,15 +17,12 @@ au FileType python map <buffer> <leader>1 /class
au FileType python map <buffer> <leader>2 /def
au FileType python map <buffer> <leader>C ?class
au FileType python map <buffer> <leader>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 <c-a> alert();<esc>hi
au FileType javascript inoremap <buffer> $r return
au FileType javascript inoremap <buffer> $f //--- PH<esc>FP2xi
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

View file

@ -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 <leader>nn :NERDTreeToggle<cr>
map <leader>m :NERDTreeToggle<cr>
map <leader>nb :NERDTreeFromBookmark
map <leader>nf :NERDTreeFind<cr>
@ -85,8 +85,7 @@ map <leader>nf :NERDTreeFind<cr>
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => vim-multiple-cursors
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
let g:multi_cursor_next_key="\<C-s>"
let g:multi_cursor_next_key='<c-s>'
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => surround.vim config
@ -159,7 +158,10 @@ func! SyntasticCheckCoffeescript()
execute "SyntasticCheck"
execute "Errors"
endfunc
nnoremap <silent> <leader>c :call SyntasticCheckCoffeescript()<cr>
nnoremap <silent> <leader>l :call SyntasticCheckCoffeescript()<cr>
let g:syntastic_mode_map = {
\ "mode": "active",
\ "passive_filetypes": ["html"] }
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""