Vim
as i’m using vim almost every day, why not make some notes to improve the skillz ?
Source: https://www.computerhope.com/unix/vim.htm and others …
.vimrc
my vim config file. do backup of the old file first!
test -f ~/.vimrc && cp ~/.vimrc ~/.vimrc.bak-$(date "+%s")
cat << 'EOF' > ~/.vimrc
" sample .vimrc from https://blog.stoege.net/posts/vim/
" Use 2 spaces for tabs
set shiftwidth=2
set tabstop=2
set expandtab
set softtabstop=0
set ruler
set mouse=r
" Disable backup and swap files because they cause more problems than they solve
set nobackup
set noswapfile
" Display line numbers
set number
" Color
syntax on
" colorscheme delek
EOF
show whitespaces
:set list
show numbers
:set numbers
ignore case
:set ignorecase
Convert File to xxd (hex editor)
:%!xxd
Revert to VIM
:%!xxd -r
Search & Replace
search for ‘box’ from line 1 to the End of the File and replace it with ‘BOX’