From 9cee46ea4739e6fd8dd8f8258d0f72e327164cac Mon Sep 17 00:00:00 2001 From: navewindre Date: Wed, 11 Sep 2024 18:25:28 +0200 Subject: a --- README.md | 17 ++++++++++++++++- vimrc | 35 ++++++++++++++++++++++++++++++----- 2 files changed, 46 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 27ef622..788abe0 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/vimrc b/vimrc index 1909822..ca03404 100644 --- a/vimrc +++ b/vimrc @@ -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 = '' 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' -- cgit v1.2.3