Skip to content

Instantly share code, notes, and snippets.

@kika
Created July 29, 2016 20:52
Show Gist options
  • Save kika/272ecb5e461aeabbe11cc1eeb895d597 to your computer and use it in GitHub Desktop.
Save kika/272ecb5e461aeabbe11cc1eeb895d597 to your computer and use it in GitHub Desktop.
vimrc
colorscheme torte
if $SHELL =~ 'bin/fish'
set shell=/bin/sh
endif
"set lines=55
"set columns=83
set ruler
set dir=~/.vimswap//,/var/tmp//,/tmp//,.
set ts=4
set sw=4
set nohlsearch
set et
if has("gui_running")
"set guifont=IBM\ 3270\ Narrow:h16
set guifont=Fixedsys\ Excelsior:h16
"set guifont=Fira\ Code:h16
set noanti " Monospace font looks ugly with antialias
set macligatures
set guioptions=egmrL
endif
:syntax enable
set textwidth=0
set ai
set statusline=%t[%{strlen(&fenc)?&fenc:'none'},%{&ff}]%h%m%r%y%=%c,%l/%L\ %P
set laststatus=2
set cc=80
set sessionoptions=sesdir,tabpages
nmap <leader>] :lnext<CR>
nmap <leader>[ :lprevious<CR>
filetype plugin on
:let g:do_xhtml_mappings = 'yes'
:let g:html_tag_case = 'lowercase'
:let g:no_html_tab_mapping = 'yes'
:let g:no_html_toolbar = 'yes'
" Restore cursor to file position in previous editing session
" http://vim.wikia.com/wiki/Restore_cursor_to_file_position_in_previous_editing_session
function! ResCur()
if line("'\"") <= line("$")
normal! g`"
return 1
endif
endfunction
augroup resCur
autocmd!
autocmd BufWinEnter * call ResCur()
augroup END
autocmd FileType javascript setl sw=2 sts=2 ts=2 et
autocmd FileType coffee setl sw=2 sts=2 ts=2 et
autocmd FileType purescript setl sw=2 sts=2 ts=2 et
autocmd FileType elm setl sw=2 sts=2 ts=2 et
autocmd FileType xml setl sw=2 sts=2 ts=2 et
" Fuse Tools XML UI descriptions
autocmd BufRead *.ux set filetype=xml
"autocmd BufWritePost *.elm silent execute "!elm-format --yes %" | edit! | set filetype=elm
silent! call pathogen#infect()
" SuperTab settings
let g:SuperTabDefaultCompletionType = "context"
silent! set runtimepath^=~/.vim/bundle/ctrlp.vim
let g:ctrlp_working_path_mode = 'ra'
" vim-csv
:let g:csv_comment = '#'
" syntastic
set statusline+=%#warningmsg#
set statusline+=%{SyntasticStatuslineFlag()}
set statusline+=%*
let g:syntastic_always_populate_loc_list = 1
let g:syntastic_auto_loc_list = 1
"let g:syntastic_check_on_open = 1
let g:syntastic_check_on_wq = 0
" Purescript IDE
au FileType purescript nmap <leader>t :PSCIDEtype<CR>
au FileType purescript nmap <leader>l :PSCIDEload<CR>
au FileType purescript nmap <leader>s :PSCIDEapplySuggestion<CR>
au FileType purescript nmap <leader>p :PSCIDEpursuit<CR>
au FileType purescript nmap <leader>c :PSCIDEcaseSplit<CR>
au FileType purescript nmap <leader>a :PSCIDEaddTypeAnnotation<CR>
au FileType purescript nmap <leader>qd :PSCIDEremoveImportQualifications<CR>
au FileType purescript nmap <leader>qa :PSCIDEaddImportQualifications<CR>
augroup HiglightTODO
autocmd!
autocmd WinEnter,VimEnter * :silent! call matchadd('Todo', 'TODO\|FIXME\|TBD', -1)
augroup END
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment