Better vim

This commit is contained in:
Thomas Lovén 2021-02-22 14:18:28 +01:00
parent 908af2cdc8
commit 3de211cb5a
3 changed files with 41 additions and 2 deletions

View File

@ -9,3 +9,6 @@ end
set -x LANG sv_SE.UTF-8 set -x LANG sv_SE.UTF-8
set -x LC_ALL sv_SE.UTF-8 set -x LC_ALL sv_SE.UTF-8
set -x EDITOR nvim
alias v vim

32
init.vim Normal file
View File

@ -0,0 +1,32 @@
set list
set listchars=tab:→\ ,trail:␣,nbsp:⋅
set noruler
set laststatus=2
set number
set relativenumber
set expandtab
set tabstop=2
set shiftwidth=2
set softtabstop=2
set smartindent
nnoremap <c-h> <c-w>h
nnoremap <c-j> <c-w>j
nnoremap <c-k> <c-w>k
nnoremap <c-l> <c-w>l
nnoremap ö :
set ignorecase
set smartcase
set incsearch
set showmatch
set hlsearch
nnoremap <silent> <space> :noh<CR>
noremap / /\v
nnoremap * *N
noh
set hidden

View File

@ -1,7 +1,9 @@
#!/bin/bash #!/bin/bash
sudo -n apt-get update sudo -n apt-get update
sudo -n DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends fish vim sudo -n DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
fish \
neovim
USER=`whoami` USER=`whoami`
sudo -n chsh $USER -s $(which fish) sudo -n chsh $USER -s $(which fish)
@ -31,3 +33,5 @@ chmod 644 ~/.ssh/config
mkdir -p ~/.config/ mkdir -p ~/.config/
ln -s ~/dotfiles/fish ~/.config/fish ln -s ~/dotfiles/fish ~/.config/fish
mkdir -p ~/.config/nvim/
ln -s ~/dotfiles/init.vim ~/.config/nvim/init.vim