diff options
| author | navewindre <boneyaard@gmail.com> | 2024-09-11 18:25:28 +0200 |
|---|---|---|
| committer | navewindre <boneyaard@gmail.com> | 2024-09-11 18:25:28 +0200 |
| commit | 9cee46ea4739e6fd8dd8f8258d0f72e327164cac (patch) | |
| tree | 0abce6464547b770c68c65c7e2ec3b4e3b79621d | |
| parent | 10de9e37c33ac82ab4fdbfe33b7405cf4c84c5c9 (diff) | |
a
| -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' |
