From a6ad237b7cf19384e702e73744ddb0bf56ac81a0 Mon Sep 17 00:00:00 2001 From: ItsDrike Date: Fri, 23 Jul 2021 19:13:35 +0200 Subject: [PATCH 1/3] Remove cfvim alias, add gdc --- home/.config/shell/aliases | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/home/.config/shell/aliases b/home/.config/shell/aliases index dc0d857..698542f 100755 --- a/home/.config/shell/aliases +++ b/home/.config/shell/aliases @@ -62,8 +62,6 @@ fi # Config access shortcuts alias cfzsh='vim ~/.config/zsh/.zshrc' -alias cfnvim='vim ~/.config/nvim/init.vim' -alias cfvim='cfnvim' alias cfalias='vim ~/.config/shell/aliases' alias cffunctions='vim ~/.config/shell/functions' alias cfprofile='vim ~/.config/shell/profile' @@ -188,6 +186,7 @@ alias cleanup='clean-trash && clean-down && clean-journal && clean-pacman' alias g='git' alias gs='git status' alias gd='git diff' +alias gdc='git diff --cached' alias gm='git merge' alias ga='git add' alias gaa='git add all' From b573f98e140902c0d62614ebd281312f40997cb6 Mon Sep 17 00:00:00 2001 From: ItsDrike Date: Fri, 23 Jul 2021 19:14:04 +0200 Subject: [PATCH 2/3] Fix jump to last position --- home/.config/nvim/rc/autocmd.vim | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/home/.config/nvim/rc/autocmd.vim b/home/.config/nvim/rc/autocmd.vim index be31f80..34e958c 100644 --- a/home/.config/nvim/rc/autocmd.vim +++ b/home/.config/nvim/rc/autocmd.vim @@ -5,11 +5,8 @@ autocmd FileType * setlocal formatoptions-=c formatoptions-=r formatoptions-=o " Have Vim jump to the last position when reopening a file -autocmd BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" +autocmd BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif " Automatically deletes all trailing whitespace on save autocmd BufWritePre * %s/\s\+$//e -" Vertically center document when entering insert mode -"autocmd InsertEnter * norm zz - From 88f418d223fe884443b5ae01a03015b28a1dda68 Mon Sep 17 00:00:00 2001 From: ItsDrike Date: Fri, 23 Jul 2021 19:14:22 +0200 Subject: [PATCH 3/3] Sort configs --- home/.config/nvim/rc/base.vim | 34 +++++++++++++++++++--------------- home/.config/nvim/rc/theme.vim | 21 +++++---------------- 2 files changed, 24 insertions(+), 31 deletions(-) diff --git a/home/.config/nvim/rc/base.vim b/home/.config/nvim/rc/base.vim index 88442d5..070021f 100644 --- a/home/.config/nvim/rc/base.vim +++ b/home/.config/nvim/rc/base.vim @@ -1,24 +1,28 @@ filetype plugin on " Enable filetype detection -set undolevels=999 " Lots of these -set history=1000 " More history -set expandtab " Expand tabs to spaces (inverse: noexpandtab) + +" Tab settings +set expandtab " Expand tabs to spaces set tabstop=4 " Tab size set shiftwidth=4 " Indentation size set softtabstop=4 " Tabs/Spaces interrop set tabpagemax=50 " More tabs -set autoindent " Enable autoindent -set showmatch " Show matching brackets + +" In-file Search (/) set ignorecase " Do case insensitive matching set incsearch " Show partial matches for a search phrase set hlsearch " Highlight Search -set laststatus=2 " Always show status line -set splitbelow splitright " Split in more natural way -set autoread " Reload files on change -set mouse=a " Enable mouse mode -set encoding=utf-8 " Use UTF-8, not ASCII (May cause issues on TTY) -set wildmode=longest,list,full " Enable autocompletion -set path+=** " Search down into subfolders with tab completion -set wildmenu " Display all matching files when we tab complete -set scrolloff=5 " Keep 5 lines horizontal scrolloff -set sidescrolloff=5 " Keep 5 characters vertical scrolloff + +" Command-mode search +set path+=** " Search down into subfolders with tab completion +set wildmode=longest,list,full " Enable autocompletion +set wildmenu " Display all matching files when we tab complete + +" Misc +set autoindent " Enable autoindent +set autoread " Reload files on change +set undolevels=999 " Lots of these +set history=1000 " More history +set encoding=utf-8 " Use UTF-8 encoding +set mouse=a " Enable mouse mode +set splitbelow splitright " Split in more natural way diff --git a/home/.config/nvim/rc/theme.vim b/home/.config/nvim/rc/theme.vim index 3bcfe64..cd4c673 100644 --- a/home/.config/nvim/rc/theme.vim +++ b/home/.config/nvim/rc/theme.vim @@ -2,9 +2,12 @@ syntax on " Turn syntax highlighting on colorscheme codedark " Requires vim-code-dark plugin -set number relativenumber " Show relative line numbers set cursorline " Highlight cursor line -set noruler " Don't show ruler, line is highlighted by above +set laststatus=2 " Always show status line +set number relativenumber " Show relative line numbers +set showmatch " Show matching brackets +set scrolloff=5 " Keep 5 lines horizonal scrolloff +set sidescrolloff=5 " Keep 5 characters vertical scrolloff set guioptions-=m " Remove menubar set guioptions-=T " Remove toolbar @@ -17,17 +20,3 @@ else set termguicolors endif - -" Airline specific theming settings -let g:airline_theme='codedark' " Use codedark theme from vim-ariline-themes -let g:airline_right_sep = "" " Don't use special separators (<) -let g:airline_left_sep = "" " Don't use special separators (>) -let g:airline#extensions#tabline#enabled = 1 " Enable tabline (top line) -let g:airline#tabline#formatter = 'unique_tail' " Tabline filename formatter -let g:webdevicons_enable_airline_statusline = 0 " Use special icons from vim-devicons (requires nerdfonts) -let g:airline_powerline_fonts = 1 " Use special symbols from powerline fonts (line no, col no) - -if empty($DISPLAY) " Use ASCII-only if we're in TTY - let g:airline_symbols_ascii = 1 -endif -