add vim colorschemes and airline

This commit is contained in:
Marty Oehme 2019-03-13 15:08:39 +01:00
parent 9073f90eda
commit 8a373f6838

View file

@ -1,15 +1,36 @@
" defines plugin directory " defines plugin directory
" Install plugins from vim with :PlugInstall " Install plugins from vim with :PlugInstall
call plug#begin('~/.local/share/nvim/plugged') call plug#begin('~/.local/share/nvim/plugged')
" Base
Plug 'tpope/vim-sensible' Plug 'tpope/vim-sensible'
Plug 'tpope/vim-commentary'
" Language Integration
Plug 'stephpy/vim-yaml' Plug 'stephpy/vim-yaml'
" Design
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
" Colorschemes
Plug 'phanviet/vim-monokai-pro'
Plug 'Nequo/vim-allomancer'
Plug 'nightsense/cosmic_latte'
call plug#end() call plug#end()
" many of these come from " PLUGIN CONFIGURATION
" http://stevelosh.com/blog/2010/09/coming-home-to-vim/#using-the-leader let g:airline_extensions = []
let g:airline_powerline_fonts=1
let g:airline_theme='raven'
" VIM SETTINGS
" set truecolor (neovim)
set termguicolors
" many of these come from
" http://stevelosh.com/blog/2010/09/coming-home-to-vim/
" sets tabs to be 4 characters, expanded into spaces, but still removable with " sets tabs to be 4 characters, expanded into spaces, but still removable with
" one press of backspace. " one press of backspace.
@ -27,16 +48,43 @@ set relativenumber
" in between " in between
set undofile set undofile
let mapleader = "<space>"
" ignores case by default but will use case when search is specifically not " ignores case by default but will use case when search is specifically not
" all lowercased " all lowercased
set ignorecase set ignorecase
set smartcase set smartcase
" remove search highlights by pressing space+n " whenever vim loses focus, save
nnoremap <leader>n :noh<cr> au FocusLost * :wa
" KEYBINDINGS
"
" set our leader key to space since with hjkl, space is largely useless
let mapleader = "\<Space>"
" set jk to escape, in case capslock is not mapped to escape on the system
inoremap jk <ESC>
" remove search highlights by pressing space+/ - the key for searching the
" first place
nnoremap <leader>/ :noh<cr>
" move around between matching brackets with tab " move around between matching brackets with tab
nnoremap <tab> % nnoremap <tab> %
nnoremap <tab> % nnoremap <tab> %
" select the whole buffer with <leader>-a
map <leader>a ggVG
" quickly edit vimrc and source it on saving, useful for testing
map <leader>V :vsp ~/.config/nvim/init.vim<cr>
au BufWritePost init.vim so ~/.config/nvim/init.vim
" get rid of the help message popping up when I miss esc and hit F1
nnoremap <F1> <ESC>
inoremap <F1> <ESC>
vnoremap <F1> <ESC>
" remove all trailing whitespaces
nnoremap <leader>W :%s/\s\+$//<cr>:let @/=''<CR>
" 'open new tab' with leader-t (opens new buffer and switches to it)
nnoremap <leader>t <C-w>v<C-w><C-w>