113 lines
2.1 KiB
VimL
Executable file
113 lines
2.1 KiB
VimL
Executable file
let mapleader =","
|
|
|
|
set nocompatible
|
|
filetype off
|
|
|
|
execute pathogen#infect()
|
|
|
|
set rtp+=~/.config/nvim/bundle/Vundle.vim
|
|
call vundle#begin()
|
|
Plugin 'VundleVim/Vundle.vim'
|
|
|
|
let $NVIM_TUI_ENABLE_TRUE_COLOR=1
|
|
let &t_8f = "\<Esc>[38:2:%lu:%lu:%lum"
|
|
let &t_8b = "\<Esc>[48:2:%lu:%lu:%lum"
|
|
set termguicolors
|
|
|
|
colo termcolors
|
|
|
|
let g:python_highlight_all = 1
|
|
|
|
|
|
syntax on
|
|
filetype plugin indent on
|
|
autocmd BufNewFile,BufRead,BufWritePost *.zsh-theme set syntax=zsh
|
|
autocmd BufNewFile,BufRead,BufWritePost *.lalrpop set syntax=rust
|
|
autocmd BufNewFile,BufRead,BufWritePost *.cxpr set syntax=complexpr
|
|
|
|
nnoremap <leader>B :call box#Draw()<CR>
|
|
|
|
" settings
|
|
set autoindent
|
|
set hlsearch
|
|
set tabstop=4
|
|
set shiftwidth=0
|
|
set expandtab
|
|
set number relativenumber
|
|
set encoding=utf-8
|
|
set nofoldenable
|
|
set laststatus=2
|
|
set noshowmode
|
|
set modeline
|
|
set mouse=a
|
|
|
|
let g:lightline = {
|
|
\ 'colorscheme': 'termcolors',
|
|
\ }
|
|
|
|
let g:LanguageClient_serverCommands = {
|
|
\ 'rust': ['rust-analyzer'],
|
|
\ }
|
|
|
|
" Custom bindings for system copy-paste
|
|
nmap <C-y> "+yy
|
|
nmap <C-x> "+cc
|
|
nmap <C-p> "+p
|
|
vmap <C-y> "+y
|
|
vmap <C-x> "+c
|
|
vmap <C-p> "+p
|
|
|
|
" Switching tabs
|
|
nmap <A-TAB> :tabedit
|
|
nmap <A-1> 1gt
|
|
nmap <A-2> 2gt
|
|
nmap <A-3> 3gt
|
|
nmap <A-4> 4gt
|
|
nmap <A-5> 5gt
|
|
nmap <A-6> 6gt
|
|
nmap <A-7> 7gt
|
|
nmap <A-8> 8gt
|
|
nmap <A-9> 9gt
|
|
nmap <A-0> 10gt
|
|
nmap H gT
|
|
nmap L gt
|
|
|
|
" Split navigation
|
|
set splitbelow
|
|
set splitright
|
|
nmap <A-h> <C-w>h
|
|
nmap <A-j> <C-w>j
|
|
nmap <A-k> <C-w>k
|
|
nmap <A-l> <C-w>l
|
|
|
|
" hexHighlight plugin
|
|
nmap <leader>h <Plug>ToggleHexHighlight
|
|
nmap <leader>H <Plug>ToggleSchemeHighlight
|
|
|
|
" Remove arrow key functionality
|
|
noremap <Up> <Nop>
|
|
noremap <Down> <Nop>
|
|
noremap <Left> <Nop>
|
|
noremap <Right> <Nop>
|
|
inoremap <Up> <Nop>
|
|
inoremap <Down> <Nop>
|
|
inoremap <Left> <Nop>
|
|
inoremap <Right> <Nop>
|
|
|
|
" remove ex mode shortcut
|
|
map Q <Nop>
|
|
|
|
" Run file from shell
|
|
nnoremap <leader>r :w<CR>:!%:p<CR>
|
|
|
|
" Map <leader><leader> to stop highlighting matches
|
|
map <leader><leader> :noh<CR>
|
|
|
|
" VimWiki bindings
|
|
map <leader><CR>t :VimwikiTabnewLink<CR>
|
|
map <leader><CR>s :VimwikiSplitLink<CR>
|
|
|
|
" resize automatically
|
|
autocmd VimEnter * :silent exec "!kill -s SIGWINCH $PPID"
|
|
|