Skip to content

Instantly share code, notes, and snippets.

@alan-mushi
Last active June 2, 2016 16:03
Show Gist options
  • Save alan-mushi/63b970952579e5832720 to your computer and use it in GitHub Desktop.
Save alan-mushi/63b970952579e5832720 to your computer and use it in GitHub Desktop.
vimrc
" Default colorscheme
:set background=light
:colorscheme peachpuff
:syntax on
" If the terminal supports colors, let's add some
if &t_Co > 1
syntax enable
endif
:set autoindent
:set nu
:set showbreak=[...]
":set spelllang=fr
:set spelllang=en
:set tabstop=4
:set shiftwidth=4
" Ignore case for searches
":set ic
:set hlsearch
" Search while still typing
:set incsearch
" 'tree' view when browsing files
let g:netrw_liststyle= 3
" Encode everything in utf-8
:set encoding=utf-8
:set fileencoding=utf-8
" Splitting rules
:set splitright
:set splitbelow
:set wildmenu
":helptags /home/[USER]/.vim/doc/
map <F8> :cprevious<Return>
map <F9> :make<Return>:copen<Return>
map <F10> :cnext<Return>
autocmd Filetype java set makeprg=javac\ %
autocmd Filetype java inoremap {<CR> {<CR>}<Esc>O<tab>
autocmd Filetype java imap sop( System.out.println("");<Left><Left><Left>
autocmd Filetype java imap /**<CR> /**<CR><Space>*<CR>*/<Up><Space>
autocmd Filetype python setlocal expandtab
autocmd Filetype python setlocal shiftwidth=4
autocmd Filetype python setlocal softtabstop=4
autocmd Filetype c inoremap {<CR> {<CR>}<Esc>O<tab>
autocmd Filetype c imap /*<CR> /*<CR><Space>*<CR>*/<Up><Space>
au BufNewFile,BufRead *.{bb,bbappend,bbclass} set filetype=bitbake
au BufNewFile,BufRead *.click set filetype=click
au BufNewFile,BufRead *.g set filetype=antlr3
au BufNewFile,BufRead *.rs set filetype=rust
set exrc
set secure
" Ouvre la déclaration sous le curseur dans un nouvel onglet <Ctrl-\>
map <C-\> :tab split<CR>:exec("tag ".expand("<cword>"))<CR>
:let g:easytags_auto_highlight = 0
:let g:easytags_async = 1
:let g:easytags_auto_highlight = 0
:let g:easytags_include_members = 1
:let g:easytags_suppress_report = 1
" Impression
":let &printexpr="(v:cmdarg=='' ? ".
" \"system('lpr' . (&printdevice == '' ? '' : ' -P' . &printdevice)".
" \". ' ' . v:fname_in) . delete(v:fname_in) + v:shell_error".
" \" : system('mv '.v:fname_in.' '.v:cmdarg) + v:shell_error)"
" Utilise tab/shift-tab pour changer de champs avec UltiSnipet
:let g:UltiSnipsExpandTrigger="<tab>"
:let g:UltiSnipsJumpForwardTrigger="<tab>"
:let g:UltiSnipsJumpBackwardTrigger="<s-tab>"
if &term =~ '^screen'
" tmux will send xterm-style keys when its xterm-keys option is on
execute "set <xUp>=\e[1;*A"
execute "set <xDown>=\e[1;*B"
execute "set <xRight>=\e[1;*C"
execute "set <xLeft>=\e[1;*D"
endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment