Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- " == VIM PLUG =================================================================
- call plug#begin('~/.local/share/nvim/plugged')
- " Syntax Highlighting
- Plug 'crusoexia/vim-monokai'
- " UI Prettyfying
- Plug 'bling/vim-airline' " Changes the status line to use those arrow things
- Plug 'vim-airline/vim-airline-themes' " Makes the airline at the bottom look nice and boring
- Plug 'miyakogi/seiya.vim' " Something about transparency? Makes vim look nice
- " Navigation
- Plug 'jeetsukumaran/vim-buffergator' " List buffers in side bar
- Plug 'rbgrouleff/bclose.vim' " Close buffers with <leader>bd
- Plug 'kien/ctrlp.vim' " Fuzzy file search in git directory
- Plug 'scrooloose/nerdtree' " Document tree
- " Editing
- Plug 'Shougo/deoplete.nvim' " Autocomplete. NOTE: Requires 'neovim' package for python
- Plug 'Shougo/neco-syntax' " Syntax source for autocomplete
- Plug 'scrooloose/nerdcommenter' " For Ctrl+/ commenting like in Sublime Text
- Plug 'junegunn/vim-easy-align' " Text alignment
- Plug 'dhruvasagar/vim-table-mode' " Creating tables in text
- " Syntax Stuff
- Plug 'pangloss/vim-javascript'
- Plug 'mxw/vim-jsx'
- " Miscellaneous
- Plug 'tpope/vim-fugitive' " Git stuff for vim. Haven't configured yet lol
- Plug 'edkolev/tmuxline.vim' " Basically makes tmux have the same appearance as vim
- Plug 'vimwiki/vimwiki' " Personal wiki and diary
- call plug#end()
- " == CONFIG STUFF =============================================================
- " Line numbers on left side
- set number
- " set number of previous commands to save
- set history=1000
- " Automatically read changes to a file
- set autoread
- " enable filetype detection
- filetype plugin indent on
- " change leader from \ to , (easier to reach)
- let mapleader = ","
- let g:mapleader = ","
- " show command options when you press tab
- set wildmenu
- " ignore these when expanding wildcards
- set wildignore=*.o,*~,*.pyc,*/.git/*,*/.hg/*,*/.svn/*,*/.DS_Store
- " hide buffers instead of just closing them
- set hidden
- " allow backspace in insert mode
- set backspace=eol,start,indent
- " allow keys that move the cursor left/right to move to the prev/next line
- set whichwrap+=<,>,h,l
- " ignore case when searching
- set ignorecase
- " override ignorecase if the search contains uppercase characters
- set smartcase
- " highlight all matches in a search
- set hlsearch
- " incrementally search
- set incsearch
- " searches do not around EOF
- set nowrapscan
- " pretty self explanatory. Only redraw when you need to
- set lazyredraw
- " magic
- set magic
- " no idea what this does lol
- set mat=2
- " no annoying noises on error
- set noerrorbells
- set novisualbell
- " apparently nvim doesn't use this so idk
- set t_vb=
- " set timeout to wait for a mapped sequence to complete
- set tm=500
- " enable syntax highlighting
- syntax enable
- " set colorscheme
- colorscheme monokai
- " duh
- set encoding=utf8
- " Set order of EOL formats to try
- set ffs=unix,dos,mac
- " turn tabs to spaces (yeah fight me)
- set expandtab
- set smarttab
- " set tab size to 4 spaces (vimwiki uses 2 spaces though lol)
- set shiftwidth=4
- set tabstop=4
- set softtabstop=4
- " highlight cursor line
- set cursorline
- " wrap really long lines
- set linebreak
- " set max line to 500 chars
- set textwidth=500
- " continue indentation from current line when starting a new line
- set autoindent
- " do smart autoindenting when starting a new line
- set smartindent
- " wrap lines longer than the width of the window
- set wrap
- " Moving around
- " j and k but they work for line wraps too
- nnoremap j gj
- nnoremap k gk
- " remap moving between splits
- map <C-j> <C-W>j
- map <C-k> <C-W>k
- map <C-h> <C-W>h
- map <C-l> <C-W>l
- " close buffer
- map <leader>bd :Bclose<cr>
- " change current directory to the current file
- map <leader>cd :cd %:p:h<cr>:pwd<cr>
- " something about switching between buffers? I don't use this but if I take it out something will probably break lol
- try
- set switchbuf=useopen,usetab,newtab
- set stal=2
- catch
- endtry
- " Return to last edit position when opening files
- au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
- " enable mouse stuff
- set mouse=a
- " change backup and swap directories
- " a cron job will clean these out every once in a while
- set backupdir=~/.vim/backup//
- set directory=~/.vim/swp//
- " == PLUGIN STUFF =============================================================
- " Vim Airline Config
- let g:airline_theme='minimalist'
- set showtabline=0
- let g:airline_powerline_fonts = 1
- " don't show something on the last line because airline takes care of that or something
- set noshowmode
- " CtrlP
- let g:ctrlp_custom_ignore = {
- \ 'dir': '\v[\/](\.(git|hg|svn)|\_site|node_modules)$',
- \ 'file': '\v\.(exe|so|dll|class|png|jpg|jpeg)$',
- \}
- let g:ctrlp_working_path_mode = 'r'
- nmap <leader>p :CtrlP<cr>
- nmap <leader>bb :CtrlPBuffer<cr>
- nmap <leader>bm :CtrlPMixed<cr>
- nmap <leader>bs :CtrlPMRU<cr>
- " Buffergator
- let g:buffergator_viewport_split_policy = 'R'
- let g:buffergator_suppress_keymaps = 1
- let g:buffergator_show_full_directory_path = 0
- nmap <leader>bl :BuffergatorOpen<cr>
- " open new buffer
- nmap <leader>T :enew<cr>
- nmap <leader>bq :bp <BAR> bd #<cr>
- " NERDCommenter
- let g:NERDSpaceDelims = 1
- let g:NERDCompactSexyComs = 1
- let g:NERDDefaultAlign = 'left'
- let g:NERDCommentEmptyLines = 1
- " map Ctrl+/ to toggle comments like in Sublime Text
- nmap <C-_> <leader>c<space>
- vmap <C-_> <leader>c<space>
- " NERDTree
- " There are probably more things that nerdtree should ignore but like, I barely use it
- let NERDTreeIgnore = ['\.pyc$']
- " Enable seiya mystery plugin
- let g:seiya_auto_enable=1
- " Deoplete
- let g:deoplete#enable_at_startup = 1
- inoremap <silent><expr> <TAB>
- \ pumvisible() ? "\<C-n>" :
- \ <SID>check_back_space() ? "\<TAB>" :
- \ deoplete#mappings#manual_complete()
- function! s:check_back_space() abort "{{{
- let col = col('.') - 1
- return !col || getline('.')[col - 1] =~ '\s'
- endfunction"}}}<Paste>
- " vim-jsx thing
- let g:jsx_ext_required = 0
- " tmuxline
- let g:tmuxline_preset = {
- \'a': '#S',
- \'y': ['%R', '%a', '%Y'],
- \'z': '#h',
- \'win': ['#I', '#W'],
- \'cwin': ['#I', '#W'],
- \'options': {'status-justify': 'left'}
- \}
- " vimwiki directory in google drive
- let g:vimwiki_list = [{'path':'~/gdrive/vimwiki', 'path_html':'~/gdrive/vimwiki/html'}]
- " == SYNTAX SPECIFIC STUFF ====================================================
- au FileType python source ~/.config/nvim/python.vim
- au FIleType vimwiki source ~/.config/nvim/vimwiki.vim
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement