incremental changes

This commit is contained in:
2019-01-02 16:49:47 +03:00
parent d8a7e4fce5
commit 1c5c4b400a
7 changed files with 44 additions and 10 deletions

View File

@@ -13,13 +13,16 @@ call vundle#begin()
"call vundle#begin($HOME/vimfiles/bundle/) "call vundle#begin($HOME/vimfiles/bundle/)
Plugin 'VundleVim/Vundle.vim' Plugin 'VundleVim/Vundle.vim'
Plugin 'tmhedberg/SimpylFold'
"Plugin 'Valloric/YouCompleteMe' "Plugin 'Valloric/YouCompleteMe'
Plugin 'tmhedberg/SimpylFold'
Plugin 'scrooloose/syntastic' Plugin 'scrooloose/syntastic'
Plugin 'vim-scripts/indentpython.vim' Plugin 'vim-scripts/indentpython.vim'
Plugin 'scrooloose/nerdtree' Plugin 'scrooloose/nerdtree'
Plugin 'tpope/vim-fugitive' Plugin 'tpope/vim-fugitive'
Plugin 'tpope/vim-eunuch'
Plugin 'majutsushi/tagbar' Plugin 'majutsushi/tagbar'
" Plugin 'mattn/emmet-vim'
" Plugin 'lepture/vim-jinja'
call vundle#end() call vundle#end()
"}}} "}}}

1
ftplugin/go.vim Normal file
View File

@@ -0,0 +1 @@
nnoremap <buffer> <localleader>x :term go run %<cr>

13
ftplugin/plaintex.vim Normal file
View File

@@ -0,0 +1,13 @@
setlocal foldmethod=syntax tabstop=2 shiftwidth=2
iabbrev <buffer> tit \textit
iabbrev <buffer> pg \paragraph
iabbrev <buffer> sc \section
iabbrev <buffer> sb \subsection
iabbrev <buffer> ssb \subsubsection
iabbrev <buffer> td \todo
iabbrev <buffer> mb \mathbf
nnoremap <buffer> <localleader>x :Latexmk<cr>
nnoremap <buffer> <localleader>lv :LatexView<cr>
nnoremap <buffer> <localleader>T :LatexTOC<cr>

View File

@@ -3,4 +3,4 @@ iabbrev <buffer> ipl import matplotlib.pyplot as plt
iabbrev <buffer> ipd import pandas as pd iabbrev <buffer> ipd import pandas as pd
iabbrev <buffer> inm if __name__ == '__main__' iabbrev <buffer> inm if __name__ == '__main__'
nnoremap <buffer> <localleader>x :term python3 %<cr> nnoremap <buffer> <localleader>x :term python %<cr>

View File

@@ -8,6 +8,6 @@ iabbrev <buffer> ssb \subsubsection
iabbrev <buffer> td \todo iabbrev <buffer> td \todo
iabbrev <buffer> mb \mathbf iabbrev <buffer> mb \mathbf
nnoremap <buffer> <localleader>lm :Latexmk<cr> nnoremap <buffer> <localleader>x :Latexmk<cr>
nnoremap <buffer> <localleader>lv :LatexView<cr> nnoremap <buffer> <localleader>lv :LatexView<cr>
nnoremap <buffer> <localleader>T :LatexTOC<cr> nnoremap <buffer> <localleader>T :LatexTOC<cr>

View File

@@ -1,6 +1,7 @@
let s:comment_map = { let s:comment_map = {
\ 'c': '\/\/', \ 'c': '\/\/',
\ 'cpp': '\/\/', \ 'cpp': '\/\/',
\ 'go': '\/\/',
\ 'java': '\/\/', \ 'java': '\/\/',
\ 'javascript': '\/\/', \ 'javascript': '\/\/',
\ 'vhdl': '--', \ 'vhdl': '--',
@@ -15,11 +16,13 @@ let s:comment_map = {
let s:block_map = { let s:block_map = {
\ 'c': ['\/\*', '\*\/'], \ 'c': ['\/\*', '\*\/'],
\ 'java': ['\/\*', '\*\/'], \ 'java': ['\/\*', '\*\/'],
\ 'go': ['\/\*', '\*\/'],
\ 'cpp': ['\/\*', '\*\/'], \ 'cpp': ['\/\*', '\*\/'],
\ 'python': ['"""', '"""'], \ 'python': ['"""', '"""'],
\ 'vim': ['" {{{', '" }}}'], \ 'vim': ['" {{{', '" }}}'],
\ 'css': ['\/\*', '\*\/'], \ 'css': ['\/\*', '\*\/'],
\ 'html': ['<!--', '-->'], \ 'html': ['<!--', '-->'],
\ 'jinja': ['{#', '#}'],
\ 'javascript': ['\/\*', '\*\/'] \ 'javascript': ['\/\*', '\*\/']
\ } \ }

View File

@@ -56,12 +56,14 @@ let g:tagbar_map_close = "qT"
" Webdev stuff " Webdev stuff
" {{{ " {{{
let g:user_emmet_install_global = 0 let g:user_emmet_install_global = 0
let g:user_emmet_leader_key = '<c-f>'
augroup webdev augroup webdev
autocmd! autocmd!
autocmd FileType html,css EmmetInstall autocmd FileType html,jinja,css EmmetInstall
autocmd FileType html setlocal omnifunc=htmlcomplete#CompleteTags autocmd FileType html,jinja setlocal omnifunc=htmlcomplete#CompleteTags sw=2 tabstop=2
autocmd FileType css setlocal omnifunc=csscomplete#CompleteCSS autocmd FileType css setlocal omnifunc=csscomplete#CompleteCSS
augroup END augroup END
runtime macros/matchit.vim
" }}} " }}}
" LatexBox stuff " LatexBox stuff
@@ -69,7 +71,7 @@ augroup END
let g:LatexBox_no_mappings = 1 let g:LatexBox_no_mappings = 1
let g:LatexBox_quickfix = 2 let g:LatexBox_quickfix = 2
let g:LatexBox_build_dir = 'build' let g:LatexBox_build_dir = 'build'
let g:LatexBox_latexmk_options = '-xelatex -outdir=build -shell-escape' let g:LatexBox_latexmk_options = '-outdir=build -shell-escape'
" }}} " }}}
" YouCompleteMe stuff " YouCompleteMe stuff
@@ -78,12 +80,15 @@ set completeopt-=preview
let g:ycm_autoclose_preview_window_after_completion = 0 let g:ycm_autoclose_preview_window_after_completion = 0
let g:ycm_filetype_blacklist = { let g:ycm_filetype_blacklist = {
\ 'tex': 1, \ 'tex': 1,
\ 'plaintex': 1,
\ 'markdown': 1, \ 'markdown': 1,
\ 'text': 1, \ 'text': 1,
\ 'rst': 1, \ 'rst': 1,
\ 'html': 1,
\ } \ }
if has('patch-8.0') if has('patch-8.0')
set shortmess+=c " This fixed some bug a while ago " This is supposed to hide User defined completion ^U^X^P
set shortmess+=c
endif endif
" }}} " }}}
@@ -91,9 +96,10 @@ endif
" {{{ " {{{
let g:syntastic_mode_map = { let g:syntastic_mode_map = {
\ 'mode': 'passive', \ 'mode': 'passive',
\ 'active_filetypes': ['python'] \ 'active_filetypes': ['python', 'go']
\} \}
let g:syntastic_python_checkers = ['python', 'pyflakes'] let g:syntastic_python_checkers = ['python', 'pyflakes']
let g:syntastic_go_checkers = ['go']
" }}} " }}}
" Coding style " Coding style
@@ -116,11 +122,19 @@ augroup END
augroup prose augroup prose
autocmd! autocmd!
autocmd FileType tex,text,markdown,rst autocmd FileType tex,text,plaintex,markdown,rst
\ setlocal spell spelllang=en_us textwidth=79 \ setlocal spell spelllang=en_us textwidth=79
augroup END augroup END
" }}} " }}}
" For Terminal
" {{{
augroup terminalsettings
autocmd!
autocmd TerminalOpen * setlocal nonu
augroup END
" }}}
" Mappings " Mappings
" {{{ " {{{
let mapleader = "," let mapleader = ","
@@ -196,5 +210,5 @@ iabbrev rr return
iabbrev itt import iabbrev itt import
cabbrev w!! w !sudo tee > /dev/null %<cr> cabbrev w!! w !sudo tee > /dev/null %<cr>
cabbrev ddf %:p:h cabbrev ddf %:p:h
cabbrev Pydoc term ++close pydoc cabbrev Pydoc term ++close python -m pydoc
" }}} " }}}