vimr that works with default vim
This commit is contained in:
parent
294380019c
commit
22ddfd3f76
1 changed files with 1 additions and 76 deletions
77
.vimrc
77
.vimrc
|
@ -1,31 +1,10 @@
|
||||||
" Doman vimrc
|
" Doman vimrc
|
||||||
|
|
||||||
set nocompatible " required by Vundle
|
|
||||||
set encoding=utf-8 " for better polish letters
|
set encoding=utf-8 " for better polish letters
|
||||||
set number relativenumber " relative number - gamechanger
|
set number relativenumber " relative number - gamechanger
|
||||||
set clipboard=unnamedplus " to yank into clipboard easily
|
set clipboard=unnamedplus " to yank into clipboard easily
|
||||||
set ignorecase smartcase " set search to case insensitive
|
set ignorecase smartcase " set search to case insensitive
|
||||||
set undofile
|
set undofile
|
||||||
filetype off " required by Vundle
|
|
||||||
|
|
||||||
" set the runtime path to include Vundle and initialize
|
|
||||||
set rtp+=~/.vim/bundle/Vundle.vim
|
|
||||||
|
|
||||||
" add all your plugins here
|
|
||||||
" VERY IMPORTANT
|
|
||||||
" BEFORE YOU INSTALL PLUGINS YOU NEED TO HAVE VIM PLUGGED
|
|
||||||
" PLUGIN MENAGER. TO INSTALL IT CLONE IT TO .vim/autoload/plug.vim:
|
|
||||||
" VIM_PLUG_INSTALL="https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim"
|
|
||||||
" curl -fLo ~/.vim/autoload/plug.vim --create-dirs ${VIM_PLUG_INSTALL}
|
|
||||||
" vim +PlugInstall +qall
|
|
||||||
|
|
||||||
call plug#begin()
|
|
||||||
Plug 'sainnhe/edge'
|
|
||||||
Plug 'preservim/nerdtree'
|
|
||||||
Plug 'chriskempson/base16-vim'
|
|
||||||
Plug 'ryanoasis/vim-devicons'
|
|
||||||
Plug 'dense-analysis/ale'
|
|
||||||
call plug#end()
|
|
||||||
|
|
||||||
if has("unix")
|
if has("unix")
|
||||||
let s:uname = system("uname -s")
|
let s:uname = system("uname -s")
|
||||||
|
@ -36,11 +15,8 @@ if has("unix")
|
||||||
endif
|
endif
|
||||||
" ...
|
" ...
|
||||||
|
|
||||||
" All of your Plugins must be added before the following line
|
|
||||||
filetype plugin indent on " required
|
|
||||||
|
|
||||||
" leader
|
" leader
|
||||||
let mapleader = ","
|
let mapleader = " "
|
||||||
|
|
||||||
" Specify areas where screen splits
|
" Specify areas where screen splits
|
||||||
set splitbelow
|
set splitbelow
|
||||||
|
@ -71,31 +47,10 @@ au BufNewFile,BufRead *.js,*.html,*.css,*.scss,*.yaml,*.yml,*.xlm,*.json
|
||||||
|
|
||||||
au BufRead,BufNewFile *.py,*.pyw,*.c,*.h match BadWhitespace /\s\+$/
|
au BufRead,BufNewFile *.py,*.pyw,*.c,*.h match BadWhitespace /\s\+$/
|
||||||
|
|
||||||
" better fold
|
|
||||||
let g:SimpylFold_docstring_preview=1
|
|
||||||
|
|
||||||
" Python syntax highlighting
|
" Python syntax highlighting
|
||||||
let python_highlight_all=1
|
let python_highlight_all=1
|
||||||
syntax on
|
syntax on
|
||||||
|
|
||||||
" Theme config
|
|
||||||
" set termguicolors
|
|
||||||
let base16colorspace=256
|
|
||||||
colorscheme base16-ocean
|
|
||||||
|
|
||||||
" nerdtree settings
|
|
||||||
let NERDTreeIgnore=['\.pyc$', '\~$']
|
|
||||||
|
|
||||||
" FZF configuration
|
|
||||||
nnoremap <C-p> :Files<Cr>
|
|
||||||
nnoremap <C-o> :Rg<CR>
|
|
||||||
|
|
||||||
" open FZF if no file specified
|
|
||||||
autocmd StdinReadPre * let s:std_in=1
|
|
||||||
autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | execute 'NERDTree' | wincmd l | endif
|
|
||||||
autocmd VimEnter * if argc() == 1 && isdirectory(argv()[0]) && !exists("s:std_in") | execute 'NERDTree' argv()[0] | wincmd l | endif
|
|
||||||
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif
|
|
||||||
|
|
||||||
" cursor
|
" cursor
|
||||||
let &t_SI.="\e[5 q" "SI = INSERT mode
|
let &t_SI.="\e[5 q" "SI = INSERT mode
|
||||||
let &t_SR.="\e[4 q" "SR = REPLACE mode
|
let &t_SR.="\e[4 q" "SR = REPLACE mode
|
||||||
|
@ -105,9 +60,6 @@ let &t_EI.="\e[1 q" "EI = NORMAL mode (ELSE)
|
||||||
" <Ctrl-s> redraws the screen and removes any search highlighting.
|
" <Ctrl-s> redraws the screen and removes any search highlighting.
|
||||||
nnoremap <silent> <C-s> :nohl<CR><C-l>
|
nnoremap <silent> <C-s> :nohl<CR><C-l>
|
||||||
|
|
||||||
" keybinding for nerdtree
|
|
||||||
map <C-n> :NERDTreeToggle<CR>
|
|
||||||
|
|
||||||
" Enable folding with the spacebar
|
" Enable folding with the spacebar
|
||||||
nnoremap <space> za
|
nnoremap <space> za
|
||||||
|
|
||||||
|
@ -126,30 +78,3 @@ vnoremap <leader>d "_d
|
||||||
vnoremap <leader>p "_dP
|
vnoremap <leader>p "_dP
|
||||||
|
|
||||||
set signcolumn=yes
|
set signcolumn=yes
|
||||||
" ALE config
|
|
||||||
let g:ale_linters = {
|
|
||||||
\ 'python': ['pyls', 'flake8', 'mypy'],
|
|
||||||
\ 'cs': ['OmniSharp'],
|
|
||||||
\}
|
|
||||||
|
|
||||||
let g:ale_fixers = {
|
|
||||||
\ '*': ['trim_whitespace'],
|
|
||||||
\ 'python': ['black'],
|
|
||||||
\ 'css': ['prettier'],
|
|
||||||
\ 'scss': ['prettier'],
|
|
||||||
\ 'html': ['prettier'],
|
|
||||||
\ 'javascript': ['prettier'],
|
|
||||||
\ 'json': ['prettier'],
|
|
||||||
\ 'php': ['prettier'],
|
|
||||||
\ 'yaml': ['prettier'],
|
|
||||||
\}
|
|
||||||
|
|
||||||
" ale completion is really annoying
|
|
||||||
let g:ale_completion_enabled = 0
|
|
||||||
let g:ale_completion_tsserver_autoimport = 0
|
|
||||||
let g:ale_set_highlights = 0
|
|
||||||
let g:ale_disable_lsp = 1
|
|
||||||
|
|
||||||
" ALE
|
|
||||||
nmap <silent> <F5> <Plug>(ale_previous_wrap)
|
|
||||||
nmap <silent> <C-F5> <Plug>(ale_next_wrap)
|
|
||||||
|
|
Loading…
Reference in a new issue