vimrc cleanup
This commit is contained in:
parent
8805851c18
commit
10d542decc
148
.vimrc
148
.vimrc
@ -13,84 +13,30 @@ else
|
|||||||
let &t_EI = "\<Esc>[2 q"
|
let &t_EI = "\<Esc>[2 q"
|
||||||
endif
|
endif
|
||||||
|
|
||||||
let g:ycm_confirm_extra_conf = 0
|
|
||||||
|
|
||||||
call plug#begin($VIMHOME.'/plugged')
|
call plug#begin($VIMHOME.'/plugged')
|
||||||
|
Plug 'terryma/vim-multiple-cursors'
|
||||||
|
Plug 'thinca/vim-localrc'
|
||||||
|
Plug 'vim-airline/vim-airline'
|
||||||
|
Plug 'vim-airline/vim-airline-themes'
|
||||||
|
Plug 'rafi/awesome-vim-colorschemes'
|
||||||
|
Plug 'lervag/vimtex'
|
||||||
|
Plug 'ctrlpvim/ctrlp.vim'
|
||||||
|
Plug 'tpope/vim-surround'
|
||||||
|
Plug 'airblade/vim-gitgutter'
|
||||||
|
Plug 'Valloric/YouCompleteMe'
|
||||||
|
Plug 'tpope/vim-commentary'
|
||||||
|
|
||||||
Plug 'terryma/vim-multiple-cursors'
|
" load local plugins
|
||||||
Plug 'thinca/vim-localrc'
|
if filereadable("~/.local-plugins.vimrc")
|
||||||
Plug 'vim-airline/vim-airline'
|
source "~/.local-plugins.vimrc"
|
||||||
Plug 'vim-airline/vim-airline-themes'
|
endif
|
||||||
Plug 'rafi/awesome-vim-colorschemes'
|
|
||||||
Plug 'lervag/vimtex'
|
|
||||||
Plug 'eagletmt/neco-ghc'
|
|
||||||
Plug 'ctrlpvim/ctrlp.vim'
|
|
||||||
Plug 'tpope/vim-surround'
|
|
||||||
Plug 'airblade/vim-gitgutter'
|
|
||||||
Plug 'autozimu/LanguageClient-neovim', {
|
|
||||||
\ 'branch': 'next',
|
|
||||||
\ 'do': 'powershell -executionpolicy bypass -File install.ps1',
|
|
||||||
\ }
|
|
||||||
Plug 'Valloric/YouCompleteMe'
|
|
||||||
" Plug 'scrooloose/nerdtree'
|
|
||||||
|
|
||||||
call plug#end()
|
call plug#end()
|
||||||
|
|
||||||
set colorcolumn=80,120
|
set colorcolumn=80,120
|
||||||
|
|
||||||
if filereadable("~/.local.vimrc")
|
|
||||||
source "~/.local.vimrc"
|
|
||||||
endif
|
|
||||||
|
|
||||||
"
|
"
|
||||||
" My own config
|
" My own config
|
||||||
"
|
"
|
||||||
let g:airline_powerline_fonts = 1
|
|
||||||
let g:airline_theme = "tender"
|
|
||||||
let g:airline#extensions#tabline#enabled = 1
|
|
||||||
|
|
||||||
" Required for operations modifying multiple buffers like rename.
|
|
||||||
set hidden
|
|
||||||
|
|
||||||
let g:LanguageClient_serverCommands = {
|
|
||||||
\ 'php': ['php', $VIMHOME.'/plugged/php-language-server/vendor/felixfbecker/language-server/bin/php-language-server.php']
|
|
||||||
\ }
|
|
||||||
|
|
||||||
set splitbelow
|
|
||||||
set shellslash
|
|
||||||
|
|
||||||
" UTF-8 support
|
|
||||||
if has("multi_byte")
|
|
||||||
if &termencoding == ""
|
|
||||||
let &termencoding = &encoding
|
|
||||||
endif
|
|
||||||
set enc=utf-8
|
|
||||||
set encoding=utf-8
|
|
||||||
setglobal fileencoding=utf-8
|
|
||||||
" setglobal bomb
|
|
||||||
" set fileencodings=ucs-bom,utf-8,latin1
|
|
||||||
endif
|
|
||||||
|
|
||||||
set backspace=2
|
|
||||||
set autoindent
|
|
||||||
|
|
||||||
" tabs
|
|
||||||
set expandtab
|
|
||||||
set tabstop=4
|
|
||||||
set shiftwidth=4
|
|
||||||
|
|
||||||
" syntax
|
|
||||||
syntax on
|
|
||||||
set number
|
|
||||||
|
|
||||||
" disable bells
|
|
||||||
set noeb vb t_vb=
|
|
||||||
|
|
||||||
nmap \\ :CtrlP<CR>
|
|
||||||
|
|
||||||
" filetypes
|
|
||||||
" autocmd FileType c,cpp :compiler cl
|
|
||||||
au FileType asm :set ft=masm
|
|
||||||
|
|
||||||
" one time settings
|
" one time settings
|
||||||
if !exists("g:running")
|
if !exists("g:running")
|
||||||
@ -122,12 +68,62 @@ if !exists("g:running")
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
let g:running = 1
|
||||||
|
|
||||||
|
" UTF-8 support
|
||||||
|
if has("multi_byte")
|
||||||
|
if &termencoding == ""
|
||||||
|
let &termencoding = &encoding
|
||||||
|
endif
|
||||||
|
set enc=utf-8
|
||||||
|
set encoding=utf-8
|
||||||
|
setglobal fileencoding=utf-8
|
||||||
|
" setglobal bomb
|
||||||
|
" set fileencodings=ucs-bom,utf-8,latin1
|
||||||
|
endif
|
||||||
|
|
||||||
|
" i like to have ctrl-x menu
|
||||||
|
set shortmess-=c
|
||||||
|
|
||||||
|
" Required for operations modifying multiple buffers like rename.
|
||||||
|
set hidden
|
||||||
|
set splitbelow
|
||||||
|
set shellslash
|
||||||
|
|
||||||
|
set backspace=2
|
||||||
|
set autoindent
|
||||||
|
|
||||||
|
" tabs
|
||||||
|
set expandtab
|
||||||
|
set tabstop=4
|
||||||
|
set shiftwidth=4
|
||||||
|
|
||||||
|
" syntax
|
||||||
|
syntax on
|
||||||
|
set number
|
||||||
|
|
||||||
|
" disable bells
|
||||||
|
set noeb vb t_vb=
|
||||||
|
|
||||||
|
" filetypes
|
||||||
|
" autocmd FileType c,cpp :compiler cl
|
||||||
|
au FileType asm :set ft=masm
|
||||||
|
|
||||||
|
" airline
|
||||||
|
let g:airline_powerline_fonts = 1
|
||||||
|
let g:airline_theme = "tender"
|
||||||
|
let g:airline#extensions#tabline#enabled = 1
|
||||||
|
|
||||||
|
" ctrlp
|
||||||
|
let g:ctrlp_switch_buffer = 'Et'
|
||||||
|
|
||||||
" latex
|
" latex
|
||||||
let g:vimtex_view_general_viewer = 'SumatraPDF'
|
let g:vimtex_view_general_viewer = 'SumatraPDF'
|
||||||
let g:vimtex_view_general_options
|
let g:vimtex_view_general_options
|
||||||
\ = '-reuse-instance -forward-search @tex @line @pdf'
|
\ = '-reuse-instance -forward-search @tex @line @pdf'
|
||||||
|
|
||||||
let g:running = 1
|
" ycm config
|
||||||
|
let g:ycm_confirm_extra_conf = 0
|
||||||
|
|
||||||
" no arrows
|
" no arrows
|
||||||
nnoremap <Left> <Nop>
|
nnoremap <Left> <Nop>
|
||||||
@ -136,11 +132,6 @@ nnoremap <Up> <Nop>
|
|||||||
nnoremap <Down> <Nop>
|
nnoremap <Down> <Nop>
|
||||||
|
|
||||||
set completeopt=longest,menuone
|
set completeopt=longest,menuone
|
||||||
inoremap <expr> <CR> pumvisible() ? "\<C-y>" : "\<C-g>u\<CR>"
|
|
||||||
|
|
||||||
" open omni completion menu closing previous if open and opening new menu without changing the text
|
|
||||||
inoremap <expr> <C-Space> (pumvisible() ? (col('.') > 1 ? '<Esc>i<Right>' : '<Esc>i') : '') .
|
|
||||||
\ '<C-x><C-o><C-r>=pumvisible() ? "\<lt>C-n>\<lt>C-p>\<lt>Down>" : ""<CR>'
|
|
||||||
|
|
||||||
" remapings
|
" remapings
|
||||||
nnoremap YY :%y+<CR>
|
nnoremap YY :%y+<CR>
|
||||||
@ -169,3 +160,10 @@ map <C-F5> :source ~/.vimrc<CR>
|
|||||||
|
|
||||||
vnoremap gO "py<Esc>:e <C-R>p<CR>
|
vnoremap gO "py<Esc>:e <C-R>p<CR>
|
||||||
vnoremap gT "py<Esc>:tabe <C-R>p<CR>
|
vnoremap gT "py<Esc>:tabe <C-R>p<CR>
|
||||||
|
|
||||||
|
nmap \\ :CtrlP<CR>
|
||||||
|
|
||||||
|
" local settings
|
||||||
|
if filereadable("~/.local.vimrc")
|
||||||
|
source "~/.local.vimrc"
|
||||||
|
endif
|
||||||
|
Loading…
Reference in New Issue
Block a user