nostartofline
This commit is contained in:
parent
05d8a8fffe
commit
1414292741
|
@ -101,6 +101,7 @@ set softtabstop=2
|
||||||
set noexpandtab
|
set noexpandtab
|
||||||
set autoindent smartindent
|
set autoindent smartindent
|
||||||
set list
|
set list
|
||||||
|
set nostartofline
|
||||||
set listchars=trail:·,tab:\ \
|
set listchars=trail:·,tab:\ \
|
||||||
|
|
||||||
" look and feel
|
" look and feel
|
||||||
|
@ -218,9 +219,16 @@ endif
|
||||||
autocmd VimEnter * nested if bufname('')=='' && line('$') == 1 && col('$')==1 && !&modified | bd % | endif
|
autocmd VimEnter * nested if bufname('')=='' && line('$') == 1 && col('$')==1 && !&modified | bd % | endif
|
||||||
|
|
||||||
function! TerminalSplit()
|
function! TerminalSplit()
|
||||||
vsplit
|
let current_file = @%
|
||||||
vertical resize 80
|
echo current_file
|
||||||
terminal
|
if match(current_file, "term://*") != -1
|
||||||
|
split
|
||||||
|
terminal
|
||||||
|
else
|
||||||
|
vsplit
|
||||||
|
vertical resize 80
|
||||||
|
terminal
|
||||||
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
" bindings
|
" bindings
|
||||||
|
@ -238,6 +246,7 @@ let mapleader = "\<Space>"
|
||||||
" terminal mappings
|
" terminal mappings
|
||||||
" open a terminal split at 80 columns
|
" open a terminal split at 80 columns
|
||||||
nnoremap <C-t> :call TerminalSplit()<CR>
|
nnoremap <C-t> :call TerminalSplit()<CR>
|
||||||
|
tnoremap <C-t> <C-\><C-n>:call TerminalSplit()<CR>
|
||||||
|
|
||||||
" close the terminal
|
" close the terminal
|
||||||
tnoremap <C-w> <C-\><C-n>:q!<CR>
|
tnoremap <C-w> <C-\><C-n>:q!<CR>
|
||||||
|
|
Reference in a new issue