nvim: init.vim: Let terminal job id be echoed to status line

This commit is contained in:
Sanchayan Maity 2019-12-04 11:19:18 +05:30 committed by Sanchayan Maity
parent e03e64dd56
commit 6ca10e38b2

View file

@ -221,15 +221,14 @@ nnoremap <Leader>sv <Esc>:vsp<CR>
nnoremap <Leader>x <Esc>:x<CR> nnoremap <Leader>x <Esc>:x<CR>
nnoremap <Leader>q <Esc>:q<CR> nnoremap <Leader>q <Esc>:q<CR>
nnoremap <Leader>qa <Esc>:qa<CR> nnoremap <Leader>qa <Esc>:qa<CR>
" Open terminal " Terminal
nnoremap <Leader>te :vsp<CR> :terminal<CR> nnoremap <Leader>te :vsp<CR> :terminal<CR>
" Tab navigation shortcuts
nnoremap <Leader>tn :bn<CR>
nnoremap <Leader>tp :bp<CR>
nnoremap <Leader>tj :echo b:terminal_job_id<CR>
nnoremap <Leader>tc :SlimeConfig<CR> nnoremap <Leader>tc :SlimeConfig<CR>
xmap <Leader>ts <Plug>SlimeRegionSend xmap <Leader>ts <Plug>SlimeRegionSend
nmap <Leader>ts <Plug>SlimeParagraphSend nmap <Leader>ts <Plug>SlimeParagraphSend
" Tab navigation shortcuts
nnoremap <Leader>tn :bn<CR>
nnoremap <Leader>tp :bp<CR>
" Reload opened vim config file " Reload opened vim config file
nnoremap <Leader>vr :so %<CR> nnoremap <Leader>vr :so %<CR>
" For git " For git
@ -465,6 +464,11 @@ let g:slime_python_ipython = 1
let g:slime_dont_ask_default = 1 let g:slime_dont_ask_default = 1
let g:slime_preserve_curpos = 0 let g:slime_preserve_curpos = 0
augroup Terminal
au!
au TermOpen * setlocal statusline=%{b:terminal_job_id}
augroup END
" Default indentations " Default indentations
autocmd BufRead,BufNewFile */gst-*/*.[ch] set et sw=2 autocmd BufRead,BufNewFile */gst-*/*.[ch] set et sw=2
autocmd BufRead,BufNewFile */gstreamer-*/*.[ch] set et sw=2 autocmd BufRead,BufNewFile */gstreamer-*/*.[ch] set et sw=2