dotfiles/vim/vimrc

109 lines
2.5 KiB
VimL
Raw Normal View History

2020-10-17 03:39:13 +02:00
set runtimepath+=~/.config/vim/runtime
2020-10-17 03:16:49 +02:00
call plug#begin('~/.config/vim/plugins')
"Plug 'ashfinal/vim-colors-paper'
2020-10-16 23:39:46 +02:00
Plug 'arcticicestudio/nord-vim'
2020-03-03 12:46:21 +01:00
Plug 'junegunn/fzf'
Plug 'junegunn/fzf.vim'
2020-10-01 14:49:09 +02:00
Plug 'mhinz/vim-signify'
2020-03-03 12:46:21 +01:00
Plug 'rodjek/vim-puppet'
Plug 'junegunn/goyo.vim'
2020-03-03 13:02:39 +01:00
Plug 'dense-analysis/ale'
2020-03-16 23:37:43 +01:00
Plug 'jiangmiao/auto-pairs'
2020-03-03 13:02:39 +01:00
Plug 'frazrepo/vim-rainbow'
2020-03-03 12:46:21 +01:00
Plug 'itchyny/lightline.vim'
2020-08-21 16:22:21 +02:00
Plug 'airblade/vim-gitgutter'
2020-03-03 12:46:21 +01:00
Plug 'junegunn/limelight.vim'
Plug 'bitc/vim-bad-whitespace'
call plug#end()
2016-06-15 13:55:21 +02:00
set title
set number
2016-06-14 13:31:47 +02:00
set gdefault
2020-10-17 03:16:49 +02:00
set wildmenu
2016-06-14 13:31:47 +02:00
set nobackup
2020-10-17 03:16:49 +02:00
set incsearch
2016-06-15 13:55:21 +02:00
set expandtab
set smartcase
2020-02-07 12:45:22 +01:00
set splitbelow
set splitright
2016-06-15 13:55:21 +02:00
set ignorecase
2016-06-14 13:31:47 +02:00
set nohlsearch
2016-06-15 13:55:21 +02:00
set noshowmode
2020-10-17 03:16:49 +02:00
set autoindent
2016-06-15 13:55:21 +02:00
set shiftround
set cursorline
set cursorcolumn
2016-06-14 13:31:47 +02:00
set nojoinspaces
set nowritebackup
2016-06-15 13:55:21 +02:00
set bs=2
set tabstop=2
set scrolloff=5
2020-10-17 03:16:49 +02:00
set laststatus=2
2016-06-15 13:55:21 +02:00
set shiftwidth=2
2020-02-06 17:06:09 +01:00
set showtabline=2
2016-06-15 13:55:21 +02:00
set softtabstop=2
2016-06-14 13:31:47 +02:00
set winminheight=0
2020-10-17 03:16:49 +02:00
set backspace=eol,start,indent
2016-06-14 13:31:47 +02:00
set matchpairs+=(:),{:},[:],<:>,':',":"
2020-10-17 03:27:43 +02:00
set viminfofile=~/.config/vim/viminfo
2016-06-14 13:31:47 +02:00
2020-02-05 15:23:43 +01:00
nmap <tab> <C-w>w
2020-02-03 11:30:45 +01:00
nmap <Esc><CR> :wq!<CR>
2020-10-01 17:13:00 +02:00
nmap <C-p> :Files<CR>
nmap <C-a> :Files ~<CR>
2020-02-06 17:06:09 +01:00
nmap <C-n> :tabnew<CR>
2020-02-07 12:45:22 +01:00
nmap <C-q> :tabclose<CR>
2020-10-01 17:46:06 +02:00
nmap <C-k> :tabprevious<CR>
nmap <C-l> :tabnext<CR>
2020-02-06 17:06:09 +01:00
nmap <C-Left> :tabprev<CR>
nmap <C-Right> :tabnext<CR>
2016-06-14 13:31:47 +02:00
map <leader>b <Esc>:set cc=79<CR>
map <leader>nb <Esc>:set cc=0<CR>
2020-03-10 15:58:53 +01:00
map <leader>n <Esc>:set nonumber!<CR>
2016-06-14 13:31:47 +02:00
map <leader>p <Esc>:set paste!<CR>
2020-03-01 23:57:33 +01:00
map <leader>f <Esc>:Goyo<CR>
2016-06-14 13:31:47 +02:00
2020-10-17 03:39:13 +02:00
syntax on
2020-10-01 15:33:31 +02:00
set bg=dark
2020-03-17 00:37:05 +01:00
set t_ZH=
set t_ZR=
hi Comment cterm=italic gui=italic
2016-06-15 13:55:21 +02:00
hi BadWhitespace ctermbg=lightblue guibg=lightblue
2020-10-17 03:16:49 +02:00
if has("gui")
set guioptions-=e
set guioptions-=r
set guioptions-=L
set guifont=Hack\ Nerd\ Font\ Mono:h14
endif
colorscheme nord
2016-06-15 13:55:21 +02:00
2020-03-03 12:46:21 +01:00
autocmd! User GoyoEnter Limelight
autocmd! User GoyoLeave Limelight!
2020-02-05 15:23:43 +01:00
command! -bang -nargs=? -complete=dir Files
2020-10-17 03:16:49 +02:00
\ call fzf#vim#files(<q-args>, {'options': ['-e', '--layout=reverse', '--preview', 'bat --color=always --style=plain --theme="Nord" {}']}, <bang>0)
2020-10-15 13:59:31 +02:00
command! -bang -nargs=? -complete=dir Colors
\ call fzf#vim#colors({'options': ['-e', '--layout=reverse', '--preview', '']}, <bang>0)
2020-02-05 15:23:43 +01:00
let g:rainbow_active = 1
2020-03-03 12:46:21 +01:00
let g:terraform_fmt_on_save=1
let g:lightline = {
2020-10-16 23:39:46 +02:00
\ 'colorscheme': 'nord',
\ 'active': {
\ 'left': [ [ 'mode', 'paste' ],
2020-10-01 14:49:09 +02:00
\ [ 'readonly', 'filename' ] ],
\ 'right': [ [ 'lineinfo' ],
\ [ 'percent' ],
2020-02-05 17:28:50 +01:00
\ [ 'filetype' ] ]
\ },
\ 'component_function': {
2020-02-06 17:06:09 +01:00
\ 'fugitive': 'FugitiveHead',
2020-02-29 10:20:32 +01:00
\ 'readonly': 'LightLineReadonly'},
\ }
function! LightLineReadonly()
2020-02-05 17:28:50 +01:00
return &readonly && &filetype !=# 'help' ? 'RO' : ''
endfunction