Skip to content

Instantly share code, notes, and snippets.

@camwright
Last active October 2, 2017 06:14
Show Gist options
  • Save camwright/1c03b6e6e8f8d8b02268e501df4251fc to your computer and use it in GitHub Desktop.
Save camwright/1c03b6e6e8f8d8b02268e501df4251fc to your computer and use it in GitHub Desktop.
"Use 24-bit (true-color) mode in Vim/Neovim when outside tmux.
if (empty($TMUX))
if (has("nvim"))
let $NVIM_TUI_ENABLE_TRUE_COLOR=1
endif
if (has("termguicolors"))
set termguicolors
endif
endif
"Cursor per mode
if has("autocmd")
au VimEnter,InsertLeave * silent execute '!echo -ne "\e[2 q"' | redraw!
au InsertEnter,InsertChange *
\ if v:insertmode == 'i' |
\ silent execute '!echo -ne "\e[6 q"' | redraw! |
\ elseif v:insertmode == 'r' |
\ silent execute '!echo -ne "\e[4 q"' | redraw! |
\ endif
au VimLeave * silent execute '!echo -ne "\e[ q"' | redraw!
endif
syntax on
filetype plugin indent on
set number
set relativenumber
set columns=90 lines=40
set colorcolumn=80
set cursorline
colorscheme onedark
set tabstop=2
set shiftwidth=2
set softtabstop=2
set expandtab
set backspace=indent,eol,start
set clipboard=unnamedplus
set wildmenu
set hlsearch
set incsearch
set ignorecase
set smartcase
set showmatch
map ; :
map Y y$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment