From 310107a7a353426ac89924081ec5fe66a7b00566 Mon Sep 17 00:00:00 2001 From: flyxyz123 Date: Mon, 19 Apr 2021 14:14:43 -0700 Subject: reformat and minor changes --- .config/alacritty/alacritty.yml | 4 ++++ .config/nvim/init.vim | 38 +++++++++++++++++++------------------- 2 files changed, 23 insertions(+), 19 deletions(-) diff --git a/.config/alacritty/alacritty.yml b/.config/alacritty/alacritty.yml index 7aad127e..dcc4fbfb 100644 --- a/.config/alacritty/alacritty.yml +++ b/.config/alacritty/alacritty.yml @@ -1,3 +1,7 @@ +# when set TERM use following code on windows, syntax is very bad +#env: +# TERM: alacritty + # Configuration for Alacritty, the GPU enhanced terminal emulator. # Import additional configuration files diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim index c8586c82..dee15efa 100644 --- a/.config/nvim/init.vim +++ b/.config/nvim/init.vim @@ -10,9 +10,24 @@ function Autocmd_set_fenc() return fenc_bef endfunction +" seems needs this for autocmd FileType * to work? +filetype plugin on + +" disable auto line break (tc) and insert comment (cro) +autocmd FileType * setlocal formatoptions-=c formatoptions-=r formatoptions-=o formatoptions-=t + +" auto rewrite as utf-8 if not when :w +autocmd FileType * let fenc_bef = Autocmd_set_fenc() + language en_US set number relativenumber +" set dir to current editing file's dir +set autochdir + +" always use system for ALL instead of use + and * operator? +"set clipboard+=unnamedplus + " Spaces & Tabs set tabstop=4 " number of visual spaces per TAB set softtabstop=4 " number of spaces in tab when editing @@ -34,9 +49,6 @@ set nobackup set noswapfile set noundofile -" set dir to current editing file's dir -set autochdir - "call plug#begin() "Plug 'preservim/nerdtree' "Plug 'junegunn/fzf', { 'do': { -> fzf#install() } } @@ -55,6 +67,10 @@ map l set ignorecase set smartcase +" moving in long line +nnoremap k gk +nnoremap j gj + " default statusline:set statusline=%<%f\ %h%m%r%=%-14.(%l,%c%V%)\ %P set statusline+=%< set statusline+=%f " %F or 1CTRL+G to show full path @@ -67,19 +83,3 @@ set statusline+=\ %{fenc_bef?fenc_bef:&fileencoding} set statusline+=\ \[%{&fileformat}\] set statusline+=\ %-10.(%l,%c%V%) set statusline+=\ %P - -" moving in long line -nnoremap k gk -nnoremap j gj - -" always use system for ALL instead of use + and * operator? -"set clipboard+=unnamedplus - -" seems needs this for autocmd FileType * to work? -filetype plugin on - -" disable auto line break (tc) and insert comment (cro) -autocmd FileType * setlocal formatoptions-=c formatoptions-=r formatoptions-=o formatoptions-=t - -" auto rewrite as utf-8 if not when :w -autocmd FileType * let fenc_bef = Autocmd_set_fenc() -- cgit v1.2.3-70-g09d2