Last active
April 14, 2024 10:23
-
-
Save alexolinux/9d42fdf9617c8c76eedc60353e6c1686 to your computer and use it in GitHub Desktop.
My custom vimrc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
syntax on | |
set showcmd | |
set hlsearch | |
set wildmenu | |
set ai | |
set si | |
set et | |
set sw=2 | |
set ts=2 | |
set sts=2 |
CKAD Shortcut Tips
alias k="kubectl" && \
alias kdr="kubectl -o yaml --dry-run=client"
cat <<EOF > ~/.vimrc
syntax on
set showcmd
set hlsearch
set wildmenu
set ai
set si
set et
set sw=2
set ts=2
set sts=2
EOF
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Vim Options
syntax on
: Enables syntax highlighting in Vim, which colorizes different elements of your code (keywords, comments, etc.) to make it more readable.set cursorline
: Highlights the line where the cursor is located, making it easier to identify the current position in the file.set cursorcolumn
: Similar to cursorline, but highlights the current column instead of the line.set showcmd
: Displays the incomplete command you are typing at the bottom of the Vim window.set hlsearch
: Highlights all occurrences of the search pattern as you type it, making it easier to spot matches in the file.set wildmenu
: Enhances command-line completion by showing a menu with possible matches as you type.set shiftwidth=2
: Sets the number of spaces used for each level of indentation when using the << and >> commands.set tabstop=2
: Sets the number of spaces that a Tab character represents when displaying or indenting text.set expandtab
: Converts Tab characters to spaces when you press the Tab key for indentation. This is often used to maintain consistent spacing in code, as spaces are more universally displayed than tabs.Extras (CKAD)
set et
: expandtab aliasset ts=2
: tabstop aliasset sw=2
: shiftwidth aliasset sts=2
: softtabstop alias (Let backspace delete indent)set ai
: autoindent alias (Indent at the same level of the previous line)set si
: smart ident aliasset hls
: highlightsearch alias (Highlight search terms)set ic
: ignorecase alias (Ignore sensitive case when searching in vim)set bg=dark
: Assume a dark background (better color scheme)