Back to good old vim.

This commit is contained in:
Bartek Stalewski 2021-10-07 23:59:57 +02:00
parent e95d129d99
commit 5af00aa70d
4 changed files with 12 additions and 6 deletions

2802
vim/autoload/plug.vim Normal file

File diff suppressed because it is too large Load diff

101
vim/vimrc Normal file
View file

@ -0,0 +1,101 @@
set runtimepath+=~/.config/vim
call plug#begin('$XDG_DATA_HOME/vim-plugins')
Plug 'fatih/molokai'
Plug 'junegunn/fzf'
Plug 'junegunn/fzf.vim'
Plug 'mhinz/vim-signify'
Plug 'junegunn/goyo.vim'
Plug 'RRethy/vim-hexokinase', { 'do': 'make hexokinase' }
Plug 'dense-analysis/ale'
Plug 'itchyny/lightline.vim'
Plug 'airblade/vim-gitgutter'
Plug 'junegunn/limelight.vim'
Plug 'bitc/vim-bad-whitespace'
call plug#end()
set title
set number
set gdefault
set wildmenu
set nobackup
set incsearch
set expandtab
set smartcase
set splitbelow
set splitright
set ignorecase
set nohlsearch
set autoindent
set noshowmode
set shiftround
set cursorline
set nojoinspaces
set cursorcolumn
set nowritebackup
set bs=2
set tabstop=2
set scrolloff=5
set laststatus=2
set shiftwidth=2
set showtabline=0
set softtabstop=2
set winminheight=0
set backspace=eol,start,indent
set matchpairs+=(:),{:},[:],<:>,':',":"
nmap <tab> <C-w>w
nmap <Esc><CR> :wq!<CR>
nmap <C-p> :Files<CR>
nmap <C-a> :Files ~<CR>
map <leader>b <Esc>:set cc=79<CR>
map <leader>nb <Esc>:set cc=0<CR>
map <leader>n <Esc>:set nonumber!<CR>
map <leader>p <Esc>:set paste!<CR>
map <leader>f <Esc>:Goyo<CR>
set bg=dark
set termguicolors
colorscheme molokai
set t_ZH=
set t_ZR=
hi Comment cterm=italic gui=italic
hi BadWhitespace ctermbg=lightblue guibg=lightblue
hi! Normal ctermbg=NONE guibg=NONE
hi! NonText ctermbg=NONE guibg=NONE
let g:Hexokinase_highlighters = [ 'backgroundfull' ]
let g:rainbow_active = 1
let g:limelight_conceal_ctermfg = '0'
let g:limelight_conceal_guifg = '0'
autocmd! User GoyoEnter Limelight
autocmd! User GoyoLeave Limelight!
let $FZF_DEFAULT_COMMAND='fd -H -L --ignore-file ~/.local/settings/fd'
command! -bang -nargs=? -complete=dir Files
\ call fzf#vim#files(<q-args>, {'options': ['-e', '--layout=reverse', '--preview', 'bat --color=always --style=plain --theme=Monokai\ Extended\ Bright {}']}, <bang>0)
command! -bang -nargs=? -complete=dir Colors
\ call fzf#vim#colors({'options': ['-e', '--layout=reverse', '--preview', '']}, <bang>0)
let g:lightline = {
\ 'colorscheme': 'powerlineish',
\ 'active': {
\ 'left': [ [ 'mode', 'paste' ],
\ [ 'readonly', 'filename' ] ],
\ 'right': [ [ 'lineinfo' ],
\ [ 'percent' ],
\ [ 'filetype' ] ]
\ },
\ 'component_function': {
\ 'readonly': 'LightLineReadonly'},
\ }
function! LightLineReadonly()
return &readonly && &filetype !=# 'help' ? 'RO' : ''
endfunction
source ~/.local/settings/vimrc