Last active
April 9, 2026 15:56
-
-
Save egel/c17b17b1c1d9045612e11f3afeff86e9 to your computer and use it in GitHub Desktop.
Simple and minimalistic `.vimrc` file for dedicated to edit files comfortably on remote servers
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
| " ------------- | |
| " General | |
| " ------------- | |
| set number " Show line numbers | |
| set linebreak " Break lines at word (requires Wrap lines) | |
| set showbreak=+++ " Wrap-broken line prefix | |
| set textwidth=120 " Line wrap (number of cols) | |
| set showmatch " Highlight matching brace | |
| set visualbell " Use visual bell (no beeping) | |
| set hlsearch " Highlight all search results | |
| set smartcase " Enable smart-case search | |
| set ignorecase " Always case-insensitive | |
| set incsearch " Searches for strings incrementally | |
| set autoindent " Auto-indent new lines | |
| set expandtab " Use spaces instead of tabs | |
| set shiftwidth=2 " Number of auto-indent spaces | |
| set smartindent " Enable smart-indent | |
| set smarttab " Enable smart-tabs | |
| set softtabstop=2 " Number of spaces per Tab | |
| " ------------- | |
| " Advanced | |
| " ------------- | |
| set ruler " Show row and column ruler information | |
| set scrolloff=5 " Minimum lines above/below cursor | |
| set number relativenumber " set relative numbers | |
| set undolevels=1000 " Number of undo levels | |
| set backspace=indent,eol,start " Backspace behaviour | |
| set listchars=tab:»·,trail:•,eol:¬,nbsp:_,extends:❯,precedes:❮ " show extra space characters | |
| set sessionoptions+=unix,slash " For unix/windows compatibility | |
| set sessionoptions-=options | |
| set nostartofline " Do not go to start of line automatically when moving | |
| set splitbelow | |
| set splitright | |
| " ------------- | |
| " Mappings | |
| " ------------- | |
| " ---- w!! - which will sudo & save a file {{{ | |
| cmap w!! %!sudo tee >/dev/null % | |
| "}}} | |
| " ---- bind Alt+<movement> keys to move around the windows instead of using Ctrl+w + <movement> {{{ | |
| map <C-j> <C-w>j | |
| map <C-k> <C-w>k | |
| map <C-h> <C-w>h | |
| map <C-l> <C-w>l | |
| "}}} | |
| " ---- vim moving with hjkl in wrapped lines {{{ | |
| nmap j gj | |
| nmap k gk | |
| vnoremap j gj | |
| vnoremap k gk | |
| "}}} | |
| " vim: ft=vim fdm=marker ts=2 sts=2 sw=2 |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
How to use it? Simply, download to your home directory: