let mapleader = " " call plug#begin('~/AppData/Local/nvim/plugged') Plug 'glacambre/firenvim', { 'do': { _ -> firenvim#install(0) } } Plug 'vim-airline/vim-airline' Plug 'vim-airline/vim-airline-themes' Plug 'rhysd/vim-gfm-syntax' Plug 'unblevable/quick-scope' Plug 'tpope/vim-commentary' Plug 'ctrlpvim/ctrlp.vim' Plug 'unblevable/quick-scope' Plug 'mbbill/undotree' Plug 'adelarsq/vim-matchit' Plug 'easymotion/vim-easymotion' Plug 'tpope/vim-surround' Plug 'tpope/vim-repeat' Plug 'nanotech/jellybeans.vim' Plug 'fatih/vim-go' Plug 'plasticboy/vim-markdown' Plug 'scrooloose/nerdtree' Plug 'ryanoasis/vim-devicons' Plug 'sheerun/vim-polyglot' Plug 'lifepillar/vim-mucomplete' call plug#end() set encoding=UTF-8 set linebreak set breakindent let &showbreak = '↪ ' set secure set list set wrap set showmatch set number set relativenumber set expandtab set noerrorbells set foldmethod=manual set nofoldenable set numberwidth=5 set history=1000 set tabstop=2 set hidden set smarttab set autoindent set autoread set ttyfast set ignorecase smartcase set magic set lazyredraw set hlsearch set scrolloff=0 set tagbsearch set wildmenu set noerrorbells set novisualbell " jellybeans colo jellybeans set background=dark let g:jellybeans_overrides = { \ 'Todo': { 'guifg': '000000', 'guibg': '00cc00', \ 'ctermfg': 'Black', 'ctermbg': 'Blue', \ 'attr': 'bold' }, \ 'Comment': { 'guifg': '339966', 'guibg': '000000' }, \ 'background': { "guibg": "000000", "ctermbg":"none"}, \ 'StorageClass': {"guifg": '9966ff' }, \ 'Exception': {"guifg": "99cc00"}, \ "Ignore": {"guifg": "336699"}, \ "SpecialComment": {"guifg": "009900"}, \ "Macro": {"guifg": "0099cc"} \} let g:jellybeans_use_term_italics = 1 let g:gfm_syntax_enable_always = 0 let g:gfm_syntax_enable_filetypes = ['markdown.gfm'] autocmd BufRead,BufNew,BufNewFile README.md setlocal ft=markdown.gfm function! OnUIEnter(event) let l:ui = nvim_get_chan_info(a:event.chan) if has_key(l:ui, 'client') && has_key(l:ui.client, 'name') if l:ui.client.name ==# 'Firenvim' set guifont=DejaVuSansMono\ NF:h12 endif endif endfunction " autocmd QueInit UIEnter * call OnUIEnter(deepcopy(v:event)) colo jellybeans let g:airline_powerline_fonts = 0 try let g:airline#extensions#tabline#enabled = 1 let g:airline#extensions#tabline#left_sep = ' ' let g:airline#extensions#tabline#left_alt_sep = '|' let g:airline#extensions#tabline#formatter = 'default' let g:airline#extensions#ale#enabled = 1 let g:airline#extensions#branch#enabled = 1 " let g:airline#extensions#xkblayout#enabled = 1 catch endtry let g:airline_theme = 'jellybeans' function! Airline_Custom() let l:spc = g:airline_symbols.space let g:airline_section_z = airline#section#create([ \ 'windowswap', \ '%3p%%'.l:spc, \ 'linenr', \ ':%3v'.l:spc, \ '%5o', \ '[%b][0x%B]' \]) endfunction autocmd user AirlineAfterInit call Airline_Custom() " let g:XkbSwitchLib = '/usr/local/lib/libxkbswitch.so' let g:airline_exclude_preview = 1 "camel and snake case motion let g:camelchar = "A-Z0-9.,;:{([`'\"_" nnoremap :call search('\C\<\\%(^\[^'.g:camelchar.']\@<=\)['.g:camelchar.']\['.g:camelchar.']\ze\%([^'.g:camelchar.']\&\>\@!\)\\%^','bW') nnoremap :call search('\C\<\\%(^\[^'.g:camelchar.']\@<=\)['.g:camelchar.']\['.g:camelchar.']\ze\%([^'.g:camelchar.']\&\>\@!\)\\%$','W') inoremap :call search('\C\<\\%(^\[^'.g:camelchar.']\@<=\)['.g:camelchar.']\['.g:camelchar.']\ze\%([^'.g:camelchar.']\&\>\@!\)\\%^','bW') inoremap :call search('\C\<\\%(^\[^'.g:camelchar.']\@<=\)['.g:camelchar.']\['.g:camelchar.']\ze\%([^'.g:camelchar.']\&\>\@!\)\\%$','W') vnoremap :call search('\C\<\\%(^\[^'.g:camelchar.']\@<=\)['.g:camelchar.']\['.g:camelchar.']\ze\%([^'.g:camelchar.']\&\>\@!\)\\%^','bW')v`>o vnoremap `>:call search('\C\<\\%(^\[^'.g:camelchar.']\@<=\)['.g:camelchar.']\['.g:camelchar.']\ze\%([^'.g:camelchar.']\&\>\@!\)\\%$','W')v` nmap nmap nmap nmap nmap nmap nmap imap imap map :bp map :bn map :q inoremap " "" inoremap ' '' inoremap ( () inoremap [ [] inoremap { {} inoremap { {}O map w :w nnoremap :NERDTreeToggle nnoremap :UndotreeToggle nnoremap :vsp nnoremap :sp nnoremap c :call clearmatches() nnoremap t :bel term nnoremap r :!%:p nnoremap cd :cd %:p:h inoremap I inoremap A nnoremap :bd map nnoremap c :call clearmatches() map w :w nnoremap t :bel term nnoremap r :!%:p let g:qs_highlight_on_keys = ["f", "F", "t", "T"] " "netrw let g:netrw_sort_by = 'date' let g:netrw_sort_direction = 'reverse' let g:netrw_banner = 0 let g:netrw_liststyle = 3 let g:netrw_browse_split = 1 let g:netrw_winsize = 15 let g:netrw_fastbrowse = 1 let g:netrw_sort_by = 'name' let g:netrw_sort_direction = 'normal' "vim-go let g:go_auto_sameids = 1 let g:go_highlight_functions = 1 let g:go_highlight_function_calls = 1 let g:go_highlight_types = 1 let g:go_highlight_operators = 1 let g:go_highlight_function_parameters = 1 " let g:go_highlight_variable_declarations = 1 " let g:go_highlight_variable_assignments = 1 let g:go_doc_popup_window = 1 let g:go_code_completion_enabled = 0 "quickscope let g:qs_highlight_on_keys = ["f", "F", "t", "T"] " undotree set undolevels=1000 if has("persistent_undo") set undodir=~/.undodir/ set undofile endif let g:undotree_WindowLayout = 4 iab adn and iab teh the iab strign string iab pritn print iab retrun return iab fucntion function iab funciton function iab tehn then iab coutn count iab accoutn account iab applciation application iab cosnt const iab ehco echo au BufEnter github.com_*.txt set filetype=markdown nnoremap :call firenvim#focus_page() nnoremap :call firenvim#hide_frame() "yaml autocmd FileType yaml setlocal ts=2 sts=2 sw=2 expandtab let g:indentLine_char = '|' inoremap " "" inoremap ' '' inoremap ( () inoremap [ [] inoremap { {} inoremap { {}O "camel and snake case motion let g:camelchar = "A-Z0-9.,;:{([`'\"_" nnoremap :call search('\C\<\\%(^\[^'.g:camelchar.']\@<=\)['.g:camelchar.']\['.g:camelchar.']\ze\%([^'.g:camelchar.']\&\>\@!\)\\%^','bW') nnoremap :call search('\C\<\\%(^\[^'.g:camelchar.']\@<=\)['.g:camelchar.']\['.g:camelchar.']\ze\%([^'.g:camelchar.']\&\>\@!\)\\%$','W') inoremap :call search('\C\<\\%(^\[^'.g:camelchar.']\@<=\)['.g:camelchar.']\['.g:camelchar.']\ze\%([^'.g:camelchar.']\&\>\@!\)\\%^','bW') inoremap :call search('\C\<\\%(^\[^'.g:camelchar.']\@<=\)['.g:camelchar.']\['.g:camelchar.']\ze\%([^'.g:camelchar.']\&\>\@!\)\\%$','W') vnoremap :call search('\C\<\\%(^\[^'.g:camelchar.']\@<=\)['.g:camelchar.']\['.g:camelchar.']\ze\%([^'.g:camelchar.']\&\>\@!\)\\%^','bW')v`>o vnoremap `>:call search('\C\<\\%(^\[^'.g:camelchar.']\@<=\)['.g:camelchar.']\['.g:camelchar.']\ze\%([^'.g:camelchar.']\&\>\@!\)\\%$','W')v`' call matchadd("InterestingWord".a:n, pat, 1, mid) normal! `z endfunction " multiple highlights nnoremap 1 :call HighInterestingWord(1) nnoremap 2 :call HighInterestingWord(2) nnoremap 3 :call HighInterestingWord(3) nnoremap 4 :call HighInterestingWord(4) nnoremap 5 :call HighInterestingWord(5) nnoremap 6 :call HighInterestingWord(6) nnoremap 7 :call HighInterestingWord(7) nnoremap 8 :call HighInterestingWord(8) nnoremap 9 :call HighInterestingWord(9) nnoremap 0 :call HighInterestingWord(0) "copy and paste between different Vim sessions nmap _Y :!echo ""> ~/.vi_tmp:w! ~/.vi_tmp vmap _Y :w! ~/.vi_tmp nmap _P :r ~/.vi_tmp "mucomplete set completeopt+=menuone let g:mucomplete#enable_auto_at_startup = 1 let g:mucomplete#completion_delay = 1 " firenvim write changes automatically, throttle writes let g:timer_started = v:false function! My_Write(timer) abort let g:timer_started = v:false write endfunction function! Delay_My_Write() abort if g:timer_started return end let g:timer_started = v:true call timer_start(10000, 'My_Write') endfunction au TextChanged * ++nested call Delay_My_Write() au TextChangedI * ++nested call Delay_My_Write() let g:firenvim_config = { \ 'globalSettings': { \ 'cmdlineTimeout': 3000, \ } \ }