Last active
August 15, 2017 04:57
-
-
Save bearcatsandor/79d8fe5c0bd51bc506d2e06203e792d3 to your computer and use it in GitHub Desktop.
current init.vim
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set nocompatible | |
" set encoding options as per http://vim.wikia.com/wiki/Working_with_Unicode | |
if has('multi_byte') | |
if &termencoding == '' | |
let &termencoding = &encoding | |
endif | |
set encoding=utf-8 | |
setglobal fileencoding=utf-8 | |
set fileencodings=ucs-bom,utf-8,latin1 | |
endif | |
filetype on " enable filetype detection | |
let g:mapleader = ',' " set <leader> to something closer | |
let g:maplocalleader = '.' " set <localleader> to something closer | |
" Source the vimrc file after saving it | |
if has('autocmd') | |
autocmd bufwritepost .vimrc source $MYVIMRC | |
endif | |
" setup indenting and line length | |
filetype indent on "load filetype-specific indent files | |
syntax on | |
set softtabstop=2 " number of spaces in tab when editing | |
set shiftwidth=2 " when tab key is pressed | |
set expandtab " tabs are spaces | |
set autoindent " this is a safe option | |
set shiftround " round indent to multiples of shiftwidth | |
set encoding=utf-8 | |
" line control | |
set linebreak | |
set textwidth=80 | |
set wrap | |
set formatoptions-=t " disable physical line breaking | |
set number " show line numbers | |
set relativenumber " line numbers are relative to current line | |
" move by virtual lines when a count is used and move by physical lines when | |
" using j/k | |
noremap <silent> <expr> j (v:count == 0 ? 'gj' : 'j') | |
noremap <silent> <expr> k (v:count == 0 ? 'gk' : 'k') | |
" command and window update settings | |
set noshowmode " remove mode status (using airline) | |
set showcmd " show command keypresses on statusbar | |
" set wildmenu | |
" set wildmode=list:longest | |
set updatetime=250 " vim update time is 250ms | |
set lazyredraw " redraw only when we need to | |
" turn on very magic regex status | |
nnoremap / /\v | |
set showmatch " highlight matching [{()}] | |
set incsearch " search as characters are entered | |
set ignorecase " lowercase entry searches in lcase | |
set smartcase " mixcase entry searches mixcase | |
set hlsearch " highlight matches | |
" vim files | |
"set autochdir " change vim PWD when after opening file | |
set nobackup " don't store backupfiles | |
set swapfile " use a swapfile for speed | |
set directory=/tmp " swapfile dir to /tmp to reduce clutter | |
set path=+=** " path completion for all related tasks | |
" code file folding | |
set foldmethod=syntax " perform folding based on syntax | |
set nofoldenable " folding is off on startup | |
noremap <space> zA| " toggle folding with spacebar | |
" turn off arrowkeys | |
noremap <Up> <NoP> | |
noremap <Down> <NoP> | |
noremap <Left> <NoP> | |
noremap <Right> <NoP> | |
" general remappings | |
nnoremap <leader><space> :noh<cr>| " clear highlighting faster | |
nnoremap gV `[v`]| " highlight last inserted text | |
nnoremap <leader>u :GundoToggle<CR>| " toggle gundo | |
inoremap <leader>d <C-R>=strftime("%Y-%m-%dT%H:%M")<CR>| " insert timestamp | |
map! jj <esc>| " This maps esc to the sequence 'jj' | |
" open init.nvim in a new buffer | |
nmap <leader>v :e $MYVIMRC<CR> | |
" abbreviations | |
iabbrev bms Bearcat M. Şándor | |
iabbrev fss Feline Soul Systems LLC | |
iabbrev pkf ABFB D811 D4C2 DE41 D356 1135 804A 6E95 C223 2873 | |
" set colorscheme | |
set termguicolors | |
colorscheme alduin | |
hi Normal guibg=NONE ctermbg=NONE | |
"spell checking | |
set spelllang=en_us | |
"nnoremap <leader>s setlocal spell on | |
" vim-plug set up ( http://www.vim.org/scripts/script.php?script_id=4828 ) | |
call plug#begin('~/.config/nvim/plugged') | |
Plug 'ctrlpvim/ctrlp.vim' | |
Plug 'sjl/gundo.vim' | |
Plug 'jalvesaq/vimcmdline' | |
Plug 'jamessan/vim-gnupg' " transparent editing of gpg encrypted files | |
Plug 'tmux-plugins/vim-tmux' " syntax highlighting, :make and K jumps to | |
" match in man page | |
Plug 'rafi/vim-badge' " buffer badges on top bar | |
" Plug 'kien/rainbow_parentheses.vim' | |
Plug 'tpope/vim-speeddating' | |
" Airline (status bar) stuff | |
Plug 'vim-airline/vim-airline' | |
Plug 'vim-airline/vim-airline-themes' | |
Plug 'edkolev/tmuxline.vim' | |
" syntax colors | |
" Plug 'adlawson/vim-sorcerer' | |
Plug 'alessandroyorba/alduin' | |
" Plug 'jonathanfilip/vim-lucius' | |
" coding help | |
Plug 'neomake/neomake' | |
Plug 'Kuniwak/vint' | |
Plug 'othree/html5.vim' | |
Plug 'hail2u/vim-css3-syntax' | |
Plug 'davidhalter/jedi-vim' | |
Plug 'stanangeloff/php.vim' | |
Plug 'tpope/vim-surround' | |
Plug 'chrisbra/Colorizer' " show all css colors in code | |
Plug 'sirver/ultisnips' | |
" Plug 'tpope/vim-commentary' | |
Plug 'tomtom/tcomment_vim' | |
Plug 'neomake/neomake' | |
" deoplete completion begins | |
Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' } | |
Plug 'Shougo/neco-syntax' " completion based on syntax file | |
Plug 'zchee/deoplete-jedi' " python | |
Plug 'zchee/deoplete-clang' " c languages | |
Plug 'zchee/deoplete-go' " go language | |
Plug 'zchee/deoplete-zsh' " zsh completion at the file system level | |
Plug 'Shougo/neco-vim' " vim-script | |
Plug 'wellle/tmux-complete.vim' " completion based on open tmux panes | |
"Plug 'thalesmello/webcomplete.vim' " currently open webpage | |
Plug 'lervag/vimtex' | |
Plug 'janko-m/vim-test' | |
"Plug 'roxma/vim-tmux-clipboard' " Not needed with neovim terminal | |
Plug 'c0r73x/neotags.nvim' | |
Plug 'terryma/vim-multiple-cursors' | |
Plug 'gentoo/gentoo-syntax' | |
Plug 'chrisbra/csv.vim' " work with csv files | |
" git help | |
Plug 'keith/gist.vim' " gist interface. Might be one for neovim | |
Plug 'tpope/vim-fugitive' | |
Plug 'airblade/vim-gitgutter' | |
" " file systems and admin | |
" Plug 'scrooloose/nerdtree' | |
Plug 'wincent/ferret' " multi-file search using ag | |
Plug 'chr4/nginx.vim' " syntax highlighting and snippits | |
Plug 'vifm/neovim-vifm' " navigate and perform file actions via vifm | |
"Realtime collaberative editing (free account, no | |
"private workspaces) | |
"Plug 'Floobits/floobits-neovim' | |
" System administration | |
Plug 'saltstack/salt-vim' | |
" music and audio processing | |
Plug 'supercollider/scvim' | |
call plug#end() | |
" ack.vim settings | |
if executable('ag') | |
let g:ackprg = 'ag --vimgrep' | |
endif | |
" tmuxline.vim settings (make tmux status line match vim) | |
let g:tmuxline_powerline_separators = 3 | |
let g:tmuxline_preset = { | |
\'a' : ['#I', '#W', '#F'], | |
\'z' : '#h:#S'} | |
" let g:tmuxline_separators = { | |
" \ 'left' : '', | |
" \ 'left_alt': '>', | |
" \ 'right' : '', | |
" \ 'right_alt' : '<', | |
" \ 'space' : ' '} | |
" | |
" vim-airline settings | |
let g:airline_theme='alduin' " use aldun syntax colors for status bar | |
let g:airline#extensions#tagbar#enabled = 1 " show buffer at top line | |
" gist settings | |
let g:gist_open_url=0 | |
let g:gist_copy_url=1 | |
" cltrlp.vim settings | |
let g:ctrlp_map = '<c-p>' | |
let g:ctrlp_cmd = 'CtrlP' | |
" neomake settings | |
" run neomake automatically when ever file is saved | |
autocmd! BufWritePost,BufEnter * Neomake | |
" open locations window automatically upon error and close when file is saved | |
" and all errors are gone | |
let g:neomake_open_list = 2 | |
"deoplete.nvim settings | |
"set runtimepath+=~/path/to/deoplete.nvim/ | |
let g:deoplete#enable_at_startup = 1 | |
call deoplete#custom#set('_', 'matchers', ['matcher_full_fuzzy']) | |
let g:tmuxcomplete#trigger = '' " no need for deoplete autotrigger | |
" neotags settings | |
" use silver searcher for generating tags | |
let g:neotags_appendpath = 0 | |
let g:neotags_recursive = 0 | |
let g:neotags_ctags_bin = 'ag -g "" '. getcwd() .' | ctags' | |
" vimcmdline mappings | |
let g:cmdline_map_start = '<LocalLeader>s' | |
let g:cmdline_map_send = '<Space>' | |
let g:cmdline_map_source_fun = '<LocalLeader>f' | |
let g:cmdline_map_send_paragraph = '<LocalLeader>p' | |
let g:cmdline_map_send_block = '<LocalLeader>b' | |
let g:cmdline_map_quit = '<LocalLeader>q' | |
" vimcmdline options | |
let g:cmdline_vsplit = 1 " Split the window vertically | |
let g:cmdline_esc_term = 1 " Remap <Esc> to :stopinsert in Neovim terminal | |
let g:cmdline_in_buffer = 1 " Start the interpreter in a Neovim buffer | |
let g:cmdline_term_height = 15 " Initial height of interpreter window or pane | |
let g:cmdline_term_width = 80 " Initial width of interpreter window or pane | |
let g:cmdline_tmp_dir = '/tmp' " Temporary directory to save files | |
let g:cmdline_outhl = 1 " Syntax highlight the output | |
let g:cmdline_follow_colorscheme = 1 | |
" vimcmdline interpreters | |
let g:cmdline_app = {} | |
let g:cmdline_app['python'] = 'pypy3' | |
let g:cmdline_app['ruby'] = 'pry' | |
let g:cmdline_app['sh'] = 'zsh' | |
""""" neovim terminal settings"""""""""""""""" | |
tnoremap <Esc> <C-\><C-n>| " map <ESC> to exit terminal-mode | |
" terminal colors (though it would be nice if it just followed the colorscheme | |
let g:terminal_color_0 = '#1c1c1c' | |
let g:terminal_color_1 = '#af5f5f' | |
let g:terminal_color_2 = '#87875f' | |
let g:terminal_color_3 = '#af875f' | |
let g:terminal_color_4 = '#878787' | |
let g:terminal_color_5 = '#af8787' | |
let g:terminal_color_6 = '#87afaf' | |
let g:terminal_color_7 = '#dfdfaf' | |
let g:terminal_color_8 = '#878787' | |
let g:terminal_color_9 = '#121212' | |
let g:terminal_color_10 = '#262626' | |
let g:terminal_color_11 = '#303030' | |
let g:terminal_color_12 = '#444444' | |
let g:terminal_color_13 = '#585858' | |
let g:terminal_color_14 = '#j5f5f87' | |
let g:terminal_color_15 = '#5f875f' | |
let g:terminal_color_16 = '#5f8787' | |
let g:terminal_color_17 = '#875f5f' | |
let g:terminal_color_18 = '#8787af' | |
let g:terminal_color_19 = '#87af87' | |
let g:terminal_color_20 = '#87afff' | |
let g:terminal_color_21 = '#af0000' | |
let g:terminal_color_22 = '#af5f00' | |
let g:terminal_color_23 = '#d75f00' | |
let g:terminal_color_24 = '#dfaf87' | |
let g:terminal_color_25 = '#ff0000' | |
let g:terminal_color_26 = '#ffdf87' | |
let g:terminal_color_27 = '#ffffff' | |
source ~/.config/nvim/workspaces.vim | |
highlight TermCursor ctermfg=55 guifg=#5f0087 " Terminal cursor is purple |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment