diff --git a/UltiSnips/python.snippets b/UltiSnips/python.snippets index 918d503..c33736a 100644 --- a/UltiSnips/python.snippets +++ b/UltiSnips/python.snippets @@ -29,26 +29,15 @@ def ${1:function name}(${2:parameters}): $0 endsnippet -snippet ae "Assert equals" -self.assertEqual(${1:var}, ${2:var}) +snippet init "Class init" +def __init__(self, ${0:params}): + return endsnippet -snippet at "Assert true" -self.assertTrue(${1:condition}) -endsnippet - -snippet af "Assert false" -self.assertFalse(${1:condition}) -endsnippet - -snippet ar "Assert raises" -self.assertRaises(${1:exception}, ${2:function}, ${3:arguments}) +snippet nocover "Remove the block from the coverage" +# pragma: no cover endsnippet -snippet ai "Assert in" +snippet ain "assertIn" self.assertIn(${1:needle}, ${2:haystack}) endsnippet - -snippet nocover "Remove the block from the coverage" -# pragma: no cover -endsnippet diff --git a/configs/gvimrc b/configs/gvimrc index b956210..12ddc03 100644 --- a/configs/gvimrc +++ b/configs/gvimrc @@ -1,4 +1,4 @@ -set guioptions=aegit " basically, all options, except the scrollbar, menu and toolbar +set guioptions=agit " basically, all options, except the scrollbar, menu and toolbar set columns=116 " number of columns (uses most of my screen, in this case) set cursorline " highlight the line with the cursor set colorcolumn=+2 " put a marker at textwidth + 2 diff --git a/configs/vimrc b/configs/vimrc index 9347678..3f2229a 100644 --- a/configs/vimrc +++ b/configs/vimrc @@ -55,7 +55,7 @@ set number " show line numbers set wim=longest,list " file auto-completion set background=dark " to follow most of the colorschemes I use set vb t_vb= " convert bells to visual bells and do nothing as visual bell -set t_Co=256 " 256 color terminals +set t_Co=256 " 256 color terminal set modeline " Enable modelines " set undofile " saves undo changes in a separate file, so we can undo anytime set lcs=tab:¦\ " uses a special char at the start of a tab character, uses spaces after that @@ -76,7 +76,7 @@ call vundle#begin() " Bundles " ---------------------------------------------------------------------- " Vundle itself! -Plugin 'gmarik/Vundle.vim' +Plugin 'VundleVim/Vundle.vim' " Magic "every updated syntax" plugin Plugin 'sheerun/vim-polyglot' @@ -85,7 +85,9 @@ Plugin 'sheerun/vim-polyglot' Plugin 'scrooloose/syntastic' " status line -Plugin 'bling/vim-airline' +" Plugin 'vim-airline/vim-airline' +" Plugin 'vim-airline/vim-airline-themes' +Plugin 'itchyny/lightline.vim' " git support Plugin 'tpope/vim-fugitive' @@ -120,6 +122,12 @@ Plugin 'altercation/vim-colors-solarized' Plugin 'w0ng/vim-hybrid' Plugin 'baycomb' Plugin 'tomasr/molokai' +Plugin 'jonathanfilip/vim-lucius' +Plugin 'chriskempson/base16-vim' +Plugin 'zenorocha/dracula-theme', {'rtp': 'vim/'} +Plugin 'Snazzyham/wwdc-2016' +Plugin 'farfanoide/vim-facebook' +Plugin 'rakr/vim-two-firewatch' " Improved syntax files Plugin 'Glench/Vim-Jinja2-Syntax' @@ -129,14 +137,15 @@ Plugin 'kchmck/vim-coffee-script' Plugin 'mattn/emmet-vim' " Project tree -Plugin 'scrooloose/nerdtree' -Plugin 'jistr/vim-nerdtree-tabs' - +" Plugin 'scrooloose/nerdtree' +" Plugin 'jistr/vim-nerdtree-tabs' +Plugin 'tpope/vim-vinegar' " CTags regeneration " Plugin 'craigemery/vim-autotag' -Plugin 'xolox/vim-misc' -Plugin 'xolox/vim-easytags' +" Plugin 'xolox/vim-misc' +" Plugin 'xolox/vim-easytags' +" Plugin 'ludovicchabant/vim-gutentags' " Shell inside VIM Plugin 'Shougo/vimproc' @@ -193,30 +202,19 @@ set wildignore+=*/build/*,*.egginfo,*.pyc,*.mo,*/dist/* " Auto-commands " ---------------------------------------------------------------------- -" Because most auto-commands add a "trim tailing spaces" regexp, we will -" create a function to do that, so auto-commands can simply :call it. -function TrimWhiteSpace() - %s/\s*$// - '' -endfunction - " default python style " (use spaces instead of tabs (expandtab), uses 4 spaces for tabs (tabstop), " when auto-indenting, also use 4 spaces (shiftwidth), when deleting text, 4 " spaces are a tab (softtabstop) and break the line at column 78 (textwidth)) " also, remove all tailing spaces au FileType python setlocal expandtab tabstop=4 shiftwidth=4 softtabstop=4 textwidth=78 colorcolumn=79 -au FileType python autocmd BufWritePre :call TrimWhiteSpace() " Default C/C++ style " show a column marker at column 100, break the line at line 100, use tabs " instead of sapces and display a "¦" for tabs (this way we can see the lines " that are not using real tabs) au FileType c setlocal colorcolumn=100 tw=100 noet list -au FileType c autocmd BufWritePre :call TrimWhiteSpace() au FileType cpp setlocal colorcolumn=100 tw=100 noet list -au FileType cpp autocmd BufWritePre :call TrimWhiteSpace() -"au FileTYpe c,cpp,objc autocmd BufwritePre :ClangFormat " Default ReStructured document style " reStructured files follow python closely, but use 3 tab stops instead of 4 @@ -266,7 +264,6 @@ au FileType coffee setlocal noet ts=2 sw=2 sts=2 list let g:vim_json_syntax_conceal = 0 autocmd BufNewFile,BufRead *.json set filetype=json autocmd Filetype json set et ts=4 sts=4 -autocmd FileType json autocmd BufWritePre :call TrimWhiteSpace() " Default Pinpoint style au BufNewFile,BufRead *.pin set filetype=pinpoint @@ -274,7 +271,12 @@ au FileType pinpoint setlocal colorcolumn=79 textwidth=78 " Default Yang style au FileType yang set et -au FileType yang autocmd BufWritePre :call TrimWhiteSpace() + +" ---------------------------------------------------------------------- +" Remove tailing spaces +" ---------------------------------------------------------------------- + +autocmd FileType c,cpp,python,yang,json autocmd BufWritePre :%s/\s\+$//e " ---------------------------------------------------------------------- " mapings @@ -337,13 +339,20 @@ let g:AutoPairsMapCR = 1 " ---------------------------------------------------------------------- let g:airline_powerline_fonts = 1 let g:airline_theme = 'understated' -let g:airline#extensions#whitespace#enabled = 0 "disabled let g:airline#extensions#branch#enabled = 1 let g:airline#extensions#syntastic#enabled = 1 let g:airline#extensions#tabline#enabled = 1 let g:airline#extensions#tabline#show_buffers = 0 let g:airline#extensions#tabline#show_tab_type = 0 let g:airline#extensions#tabline#tab_nr_type = 1 +let g:airline#extensions#whitespace#enabled = 0 "disabled + +" ---------------------------------------------------------------------- +" Lightline configuration +" ---------------------------------------------------------------------- +let g:lightline = { + \ 'colorscheme': 'wombat', + \ } " ---------------------------------------------------------------------- " CtrlP and extensions configuration @@ -372,6 +381,7 @@ let g:UltiSnipsEditSplit = "horizontal" let g:UltiSnipsExpandTrigger = "" let g:UltiSnipsJumpForwardTrigger = "" let g:UltiSnipsJumpBackwardTrigger = "" +let g:ultisnips_python_style = "sphinx" " ---------------------------------------------------------------------- " Nerdtree and Nerdtree tabs