Skip to content

Instantly share code, notes, and snippets.

@gbrls
Last active August 30, 2019 12:21
Show Gist options
  • Save gbrls/8f01eaf4b2cfed7a420253855888bf7e to your computer and use it in GitHub Desktop.
Save gbrls/8f01eaf4b2cfed7a420253855888bf7e to your computer and use it in GitHub Desktop.
my condensed vim config
" Install plugins
"call plug#begin('~/.vim/plugged')
"Plug 'sickill/vim-monokai'
"call plug#end()
set t_Co=256
let g:rehash256 = 1
"colo monokai
set termguicolors
set undofile
set undodir=~/.undodir
set number
set tabstop=4 " number of visual spaces per TAB
set softtabstop=4 " number of spaces in tab when editing
set shiftwidth=4 " number of spaces to use for autoindent
set expandtab " tabs are space
set autoindent
set copyindent
set foldcolumn=0
set signcolumn=no
set nohlsearch
set guicursor=
set linebreak
set showbreak=…
set textwidth=100
set nomodeline
set nobackup
set nowritebackup
set cmdheight=2
set updatetime=300
set shortmess+=c
function! TermToggle(height)
if win_gotoid(g:term_win)
hide
else
botright new
exec "resize " . a:height
try
exec "buffer " . g:term_buf
catch
call termopen($SHELL, {"detach": 0})
let g:term_buf = bufnr("")
set nonumber
set norelativenumber
set signcolumn=no
endtry
startinsert!
let g:term_win = win_getid()
endif
endfunction
" Toggle terminal on/off (neovim)
"noremap <silent> <A-t> :call TermToggle(10)<CR>
"inoremap <silent> <A-t> <Esc>:call TermToggle(10)<CR>
"tnoremap <silent> <A-t> <C-\><C-n>:call TermToggle(10)<CR>
" Terminal go back to normal mode
tnoremap <Esc> <C-\><C-n>
tnoremap :q! <C-\><C-n>:q!<CR>
set hidden
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment