diff options
| -rw-r--r-- | README.md | 17 | ||||
| -rw-r--r-- | vimrc | 35 |
2 files changed, 46 insertions, 6 deletions
@@ -1 +1,16 @@ -# dotfiles
\ No newline at end of file +# dotfiles + +## install + +1. install zsh (sudo apt install zsh) +2. install oh-my-zsh (sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)") +3. put config in ~/.config/dotfiles +4. put vimrc in ~/.vimrc +5. run: +``` +ln -s ~/.config/nvim/init.vim /path/to/external/editor/config/file/.vimrc +``` + +6. open vim +7. run :PlugInstall +8. enjoy @@ -264,7 +264,7 @@ let g:lightline = { \ [ 'readonly', 'filename', 'modified' ] ], \ 'right': [ [ 'lineinfo' ], \ [ 'percent' ], - \ [ 'fileformat', 'fileencoding', 'filetype', 'wpm' ] ] + \ [ 'fmtcustom', 'enccustom', 'ftcustom', 'wpm' ] ] \ }, \ 'tabline': { \ 'left': [ ['tabs'] ], @@ -272,19 +272,45 @@ let g:lightline = { \ }, \ 'component_function': { \ 'tabline_tabs': 'TablineTabs', - \ 'wpm': 'WPM' + \ 'wpm': 'WPM', + \ 'ftcustom': 'CustomFT', + \ 'enccustom': 'CustomEncode', + \ 'fmtcustom': 'CustomFileFormat' \ } \ } +function CustomFileFormat() + if &filetype != 'Avante' && &filetype != 'AvanteInput' + return &fileformat + endif + return '' +endfunction + +function CustomEncode() + if &filetype != 'Avante' && &filetype != 'AvanteInput' + return &fileencoding + endif + return '' +endfunction + +function CustomFT() + if &filetype != 'Avante' && &filetype != 'AvanteInput' + return &filetype + endif + return '' +endfunction + function WPM() - return (luaeval("require('wpm').historic_graph()") . ' ' . luaeval("require('wpm').wpm()")) . 'wpm' + if &filetype != 'Avante' && &filetype != 'AvanteInput' + return (luaeval("require('wpm').historic_graph()") . ' ' . luaeval("require('wpm').wpm()")) . 'wpm' + endif + return '' endfunction function! TablineTabs() return lightline#tabline() endfunction - let g:tabby_keybinding_accept = '<Tab>' autocmd Filetype json let g:indentLine_setConceal = 0 @@ -312,7 +338,6 @@ function! GoToTab(tab_number) execute 'tabn ' . a:tab_number endfunction - function! InputTabNumber() let l:tab_number = nr2char(getchar()) if l:tab_number =~ '\d' |
