One more try to getting back to vim.
This commit is contained in:
parent
0b356a0885
commit
d4f36022a0
@ -11,9 +11,9 @@ rm -rf ~/.fdignore ~/.fzf.bash ~/.fzf.zsh ~/.gitconfig ~/.gitignore ~/.history ~
|
|||||||
mkdir -p ~/.cache/ ~/.config ~/.local/bin ~/.local/settings
|
mkdir -p ~/.cache/ ~/.config ~/.local/bin ~/.local/settings
|
||||||
|
|
||||||
## neovim
|
## neovim
|
||||||
rm -rf ~/.config/nvim
|
rm -rf ~/.config/vim
|
||||||
ln -sf ~/.local/repos/dotfiles/nvim ~/.config/
|
ln -sf ~/.local/repos/dotfiles/vim ~/.config/
|
||||||
touch ~/.local/settings/init.vim
|
touch ~/.local/settings/vimrc
|
||||||
|
|
||||||
## fdignore
|
## fdignore
|
||||||
rm -rf ~/.config/fd
|
rm -rf ~/.config/fd
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
set runtimepath+=$XDG_CONFIG_HOME/vim
|
||||||
call plug#begin('$XDG_DATA_HOME/vim-plugins')
|
call plug#begin('$XDG_DATA_HOME/vim-plugins')
|
||||||
Plug 'fatih/molokai'
|
Plug 'fatih/molokai'
|
||||||
Plug 'junegunn/fzf'
|
Plug 'junegunn/fzf'
|
||||||
@ -15,13 +16,16 @@ call plug#end()
|
|||||||
set title
|
set title
|
||||||
set number
|
set number
|
||||||
set gdefault
|
set gdefault
|
||||||
|
set wildmenu
|
||||||
set nobackup
|
set nobackup
|
||||||
|
set incsearch
|
||||||
set expandtab
|
set expandtab
|
||||||
set smartcase
|
set smartcase
|
||||||
set splitbelow
|
set splitbelow
|
||||||
set splitright
|
set splitright
|
||||||
set ignorecase
|
set ignorecase
|
||||||
set nohlsearch
|
set nohlsearch
|
||||||
|
set autoindent
|
||||||
set noshowmode
|
set noshowmode
|
||||||
set shiftround
|
set shiftround
|
||||||
set cursorline
|
set cursorline
|
||||||
@ -32,11 +36,16 @@ set nowritebackup
|
|||||||
set bs=2
|
set bs=2
|
||||||
set tabstop=2
|
set tabstop=2
|
||||||
set scrolloff=5
|
set scrolloff=5
|
||||||
|
set backspace=eol,start,indent
|
||||||
|
set matchpairs+=(:),{:},[:],<:>,':',":"
|
||||||
|
set laststatus=2
|
||||||
set shiftwidth=2
|
set shiftwidth=2
|
||||||
set showtabline=0
|
set showtabline=0
|
||||||
set softtabstop=2
|
set softtabstop=2
|
||||||
set winminheight=0
|
set winminheight=0
|
||||||
set matchpairs+=(:),{:},[:],<:>,':',":"
|
|
||||||
|
runtime ftplugin/man.vim
|
||||||
|
autocmd FileType man setlocal nogdefault nonumber nocursorcolumn
|
||||||
|
|
||||||
nmap <tab> <C-w>w
|
nmap <tab> <C-w>w
|
||||||
nmap <Esc><CR> :wq!<CR>
|
nmap <Esc><CR> :wq!<CR>
|
||||||
@ -92,4 +101,4 @@ function! LightLineReadonly()
|
|||||||
return &readonly && &filetype !=# 'help' ? 'RO' : ''
|
return &readonly && &filetype !=# 'help' ? 'RO' : ''
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
source ~/.local/settings/init.vim
|
source ~/.local/settings/vimrc
|
@ -8,7 +8,9 @@ setopt HIST_REDUCE_BLANKS
|
|||||||
setopt SHARE_HISTORY
|
setopt SHARE_HISTORY
|
||||||
|
|
||||||
export PATH=~/.local/bin:$PATH
|
export PATH=~/.local/bin:$PATH
|
||||||
export MANPAGER="nvim +Man!"
|
export EDITOR=vim
|
||||||
|
export VIMINIT='let $MYVIMRC="$XDG_CONFIG_HOME/vim/vimrc" | source $MYVIMRC'
|
||||||
|
export MANPAGER="vim -M +MANPAGER"
|
||||||
export LESSHISTFILE='/dev/null'
|
export LESSHISTFILE='/dev/null'
|
||||||
|
|
||||||
[ ! -L ~/.cache ] && { rm -rf ~/.cache; ln -sf $XDG_CACHE_HOME ~/.cache ; }
|
[ ! -L ~/.cache ] && { rm -rf ~/.cache; ln -sf $XDG_CACHE_HOME ~/.cache ; }
|
||||||
|
@ -16,13 +16,6 @@ fi
|
|||||||
if [ $(command -v fd) ]; then
|
if [ $(command -v fd) ]; then
|
||||||
alias fd='fd -H -L --ignore-file ~/.local/settings/fd'
|
alias fd='fd -H -L --ignore-file ~/.local/settings/fd'
|
||||||
fi
|
fi
|
||||||
if [ $(command -v nvim) ]; then
|
|
||||||
export EDITOR='nvim'
|
|
||||||
alias vim='nvim'
|
|
||||||
alias vimdiff='nvim -d'
|
|
||||||
else
|
|
||||||
export EDITOR='vim'
|
|
||||||
fi
|
|
||||||
|
|
||||||
function ud() {
|
function ud() {
|
||||||
wd dots
|
wd dots
|
||||||
|
Loading…
Reference in New Issue
Block a user