Содержание

Vi

Start-up, Modes, Save and Quit

To enter Vi type:

vi FILENAME

Vi has two modes: Normal (command) mode and edit mode.
Switch to normal mode: <ESC>
Switch to edit mode: i or a

Getting out of Vi (change to normal mode <ESC>):
Exit Vi: :q
Exit Vi (ignore changes): :q!
Save: :w
Save and Exit: :wq

Switch to (edit) an other file:
:edit FILENAME

Getting help:
:help topic

https://github.com/ksemaev/lpic_1-101/blob/master/103_8.md

Цветовые схемы

Стандартный цвет комментариев - тёмно-синий на чёрном фоне, это нечитаемо. Исправить:

# В самом Vim
:color torte
# Сделать тему постоянной
echo ":color torte" >> ~/.vimrc

https://unix.stackexchange.com/questions/88879/better-colors-so-comments-arent-dark-blue-in-vim

K8s manifests syntax helper

# Установить vim-plug
curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
# Установить coc.nvim
mkdir ~/.vim/plugged
curl -sL install-node.vercel.app/lts | sudo bash
echo -e "call plug#begin('~/.vim/plugged')\nPlug 'neoclide/coc.nvim', {'branch': 'release'}\ncall plug#end()" >> ~/.vimrc
# В Vim:
:PlugInstall
:CocInstall coc-yaml

vi ~/.vim/coc-settings.json

{
  "languageserver": {
      "golang": {
        "command": "gopls",
        "rootPatterns": ["go.mod"],
        "filetypes": ["go"]
      }
  },
 
  "yaml.schemas": {
      "kubernetes": "/*.yaml"
  }
}

https://octetz.com/docs/2020/2020-01-06-vim-k8s-yaml-support/ (https://octetz.com/docs/2019/2019-04-24-vim-as-a-go-ide/)
https://github.com/junegunn/vim-plug
https://github.com/neoclide/coc.nvim

Альтернативы:

https://github.com/c9s/vikube.vim
https://github.com/andrewstuart/vim-kubernetes
https://github.com/rottencandy/vimkubectl