:w !sudo tee %
The safest way to do this is to add the following to your ~/.vimrc file:
set cm=blowfish2
set viminfo=
set nobackup
set nowritebackup
Now you can crypt file with vim -x filename
:set listchars=eol:¬,tab:>·,trail:~,extends:>,precedes:<,space:␣
:set list
The safest way to do this is to add the following to your ~/.vimrc file:
syntax on
set cursorline
set cursorcolumn
highlight CursorColumn ctermfg=White ctermbg=DarkGrey cterm=bold guifg=white guibg=yellow gui=bold
set title
set expandtab
set tabstop=2
set shiftwidth=2
set softtabstop=2
autocmd fileType yaml setlocal ai