Browse Source

updated configs

master
Julio Biason 7 years ago
parent
commit
d04e972f8a
  1. 14
      vim/UltiSnips/python.snippets
  2. 15
      vim/configs/vimrc

14
vim/UltiSnips/python.snippets

@ -7,6 +7,12 @@ snippet #py "Set the python environment."
$0
endsnippet
snippet utf8 "Set the encoding for UTF-8"
# -*- encoding: utf-8 -*-
$0
endsnippet
snippet class "Starting a Python class"
class ${1:ClassName}(${2:object}):
@ -41,3 +47,11 @@ endsnippet
snippet ain "assertIn"
self.assertIn(${1:needle}, ${2:haystack})
endsnippet
snippet logger "Add a logger for the module"
logger = logging.getLogger(__name__) # pylint:disable=invalid-name
endsnippet
snippet pdb "Add the PDB call"
import pdb; pdb.set_trace()
endsnippet

15
vim/configs/vimrc

@ -91,7 +91,7 @@ Plugin 'w0rp/ale'
Plugin 'itchyny/lightline.vim'
" git support
" Plugin 'tpope/vim-fugitive'
Plugin 'tpope/vim-fugitive'
" comment code with keys
Plugin 'tpope/vim-commentary'
@ -143,6 +143,7 @@ Plugin 'Marfisc/vorange'
Plugin 'tyrannicaltoucan/vim-quantum'
Plugin 'kamwitsta/nordisk'
Plugin 'davidklsn/vim-sialoquent'
Plugin 'trevordmiller/nova-vim'
" Improved syntax files
Plugin 'Glench/Vim-Jinja2-Syntax'
@ -274,7 +275,7 @@ au FileType mail setlocal spell spelllang=en
" This mirrors Python, except we'll be using 2 spaces instead of 4. Also,
" there is no hard-break, as JavaScript seems more prone to break in the wrong
" place than Python.
au FileType javascript setlocal expandtab tabstop=2 sw=2 sts=2 textwidth=0
au FileType javascript setlocal expandtab tabstop=4 sw=4 sts=4 textwidth=0
" Default style for cofeescript files
au FileType coffee setlocal noet ts=2 sw=2 sts=2 list
@ -299,11 +300,14 @@ au FileType pinpoint setlocal colorcolumn=79 textwidth=78
" Default Yang style
au FileType yang set et
" Yaml; same as JavaScript
au FileType yaml setlocal expandtab tabstop=4 sw=4 sts=4 textwidth=0
" ----------------------------------------------------------------------
" Remove tailing spaces
" ----------------------------------------------------------------------
autocmd FileType c,cpp,python,yang,json autocmd BufWritePre <buffer> :%s/\s\+$//e
autocmd FileType c,cpp,python,yang,json,yaml,javascript autocmd BufWritePre <buffer> :%s/\s\+$//e
" ----------------------------------------------------------------------
" mapings
@ -439,6 +443,11 @@ let g:syntastic_c_check_header = 1
let g:syntastic_c_cflags = '-Wall -Werror -W -Wno-unused-parameter -Werror=unused-variable'
let g:syntastic_cpp_compiler_options = '-std=c++11'
" ----------------------------------------------------------------------
" ALE
" ----------------------------------------------------------------------
let g:ale_sign_column_always=1
" ----------------------------------------------------------------------
" Clang formatter
" ----------------------------------------------------------------------

Loading…
Cancel
Save