dotfiles/neovim/.config/nvim/init.vim

112 lines
2.5 KiB
VimL
Raw Normal View History

syntax on
filetype indent on
set encoding=utf-8
set clipboard=unnamed
set clipboard+=unnamedplus
set smartindent
set shiftwidth=2
set tabstop=2
set expandtab
set number
set autoread
2018-09-21 08:51:56 +02:00
set hidden
set background=dark
set rtp^=/usr/share/vim/vimfiles/
2019-03-29 10:32:11 +01:00
set undodir=~/.local/share/nvim/undodir
set undofile
2019-04-03 11:51:53 +02:00
"set wildoptions=pum
"set pumblend=20
"Plugins
call plug#begin('~/.local/share/nvim/plugged')
2019-04-03 11:51:53 +02:00
" Pretty Status Lines
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
2019-04-03 11:51:53 +02:00
" Completion
2019-03-29 10:32:11 +01:00
Plug 'Shougo/deoplete.nvim'
Plug 'zchee/deoplete-jedi'
Plug 'SirVer/ultisnips'
Plug 'honza/vim-snippets'
2019-04-03 11:51:53 +02:00
" Colorscheme
Plug 'arcticicestudio/nord-vim'
" Pretty parenthesis
Plug 'luochen1990/rainbow'
" Terminal
Plug 'https://gitlab.com/Lenovsky/nuake.git'
" File handling
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
Plug 'junegunn/fzf.vim'
" Python
Plug 'numirias/semshi'
Plug 'w0rp/ale'
Plug 'ambv/black'
" HTML
Plug 'jonsmithers/vim-html-template-literals'
2019-04-12 10:32:48 +02:00
Plug 'mxw/vim-jsx'
Plug 'pangloss/vim-javascript'
Plug 'alvan/vim-closetag'
call plug#end()
2019-01-08 13:57:59 +01:00
colorscheme nord
"Airline
let g:airline#extensions#tabline#enabled = 1
let g:Powerline_symbols='unicode'
2019-01-08 13:57:59 +01:00
let g:airline_theme='nord'
2019-03-29 10:32:11 +01:00
" Deoplete
let g:deoplete#enable_at_startup = 1
" Syntastic
let g:syntastic_python_checkers = ['python']
2019-01-08 13:57:59 +01:00
"Rainbow Parentheses
let g:rainbow_active = 1
" Ultisnips
let g:UltiSnipsExpandTrigger="<c-v>"
let g:UltiSnipsJumpForwardTrigger="<c-b>"
let g:UltiSnipsJumpBackwardTrigger="<c-z>"
" HTML
let g:closetag_filenames = '*.html,*.js'
let g:html_indent_style1 = "inc"
" Black
autocmd BufWritePre *.py execute ':Black'
2019-04-03 11:51:53 +02:00
" FZF
let $FZF_DEFAULT_COMMAND = 'ag --ignore .git -g ""'
command! -bang -nargs=? -complete=dir HFiles
\ call fzf#vim#files(<q-args>, {'source': 'ag --hidden --ignore .git -g ""'}, <bang>0)
map <M-1> :Files<CR>
map <M-2> :HFiles<CR>
" Nuake
let g:nuake_position = 'bottom'
let g:nuake_per_tab = 1
nnoremap <F12> :Nuake<CR>
inoremap <F12> <C-\><C-n>:Nuake<CR>
tnoremap <F12> <C-\><C-n>:Nuake<CR>
"Mappings
:nmap <c-s> :w<CR>
:imap <c-s> <Esc>:w<CR>a
2019-04-03 11:51:53 +02:00
:nmap <F28> :bd<CR>
nnoremap <C-J> <C-W><C-J>
nnoremap <C-K> <C-W><C-K>
nnoremap <C-L> <C-W><C-L>
nnoremap <C-H> <C-W><C-H>
nnoremap <F7> :bp<CR>
nnoremap <F8> :bn<CR>
nnoremap <F9> :%!jq '.'
2019-04-03 11:51:53 +02:00
" F2 Sets Working Directory to current. Ctrl+F2 sets it to home directory
nnoremap <F2> :lcd %:p:h<CR>
nnoremap <F26> :lcd ~<CR>
"AutoCommands
au BufWinEnter * set number
au FileType xml setlocal equalprg=xmllint\ --format\ --recover\ -\ 2>/dev/null
2018-10-17 21:06:18 +02:00
autocmd FileType python setlocal completeopt-=preview