subterminal

This commit is contained in:
Pavel Korytov 2019-05-20 22:30:19 +03:00
parent e80709e371
commit b866f7de55

View file

@ -58,7 +58,7 @@ Plug 'chrisbra/csv.vim'
Plug 'w0rp/ale'
"Other
Plug 'https://gitlab.com/code-stats/code-stats-vim.git'
"Plug 'https://gitlab.com/code-stats/code-stats-vim.git'
Plug 'wakatime/vim-wakatime'
Plug 'nathanaelkane/vim-indent-guides'
@ -115,10 +115,6 @@ noremap <silent> <ScrollWheelUp> :call comfortable_motion#flick(-40)<CR>
nnoremap <Tab> :TagbarToggle<CR>
"Splits
nnoremap <C-J> <C-W><C-J>
nnoremap <C-K> <C-W><C-K>
nnoremap <C-L> <C-W><C-L>
nnoremap <C-H> <C-W><C-H>
"Other mappings
nmap <C-p> :Files<CR>
@ -131,10 +127,33 @@ let g:UltiSnipsExpandTrigger="<C-j>"
let g:UltiSnipsJumpForwardTrigger="<C-S-j>"
let g:UltiSnipsJumpBackwardTrigger=""
"Buffers and stuff
function! SubTerminal()
let current_tabpage = tabpagenr()
let subterminal_name = current_tabpage . '_terminal'
let terminal_num = bufnr(subterminal_name)
if terminal_num == -1
execute ':new ' . subterminal_name
execute ':resize 10'
if isdirectory("venv")
execute ':terminal'
else
execute ':terminal'
endif
normal i
else
execute ':bwipeout! ' . terminal_num
execute ':bwipeout! ' . (terminal_num + 1)
endif
endfunction
nmap ` :call SubTerminal()<CR>
"Formatting
"command! JSONFormatCursor :silent! exe jdaddy#reformat('jdaddy#inner_pos', v:count1)<CR>
"Indent stuff
"Indent & folding stuff
set tabstop=4
set shiftwidth=4
set smarttab
@ -145,7 +164,7 @@ set autoindent
set foldmethod=syntax
set foldlevelstart=1
function SetPugOptions()
function! SetPugOptions()
set foldmethod=indent
set foldlevel=20
endfunction
@ -175,7 +194,6 @@ syntax on
"let g:syntastic_check_on_open = 1
"let g:syntastic_check_on_wq = 0
"Install: python-language-server, pylama, autopep8
let g:ale_open_list = 'on_save'
let g:ale_list_window_size = 7
let g:ale_close_preview_on_insert = 1