Skip to content

Instantly share code, notes, and snippets.

@decisivedevops
Last active June 10, 2023 13:19
Show Gist options
  • Save decisivedevops/d929f1bc7906baed8c55a65c9a90f23e to your computer and use it in GitHub Desktop.
Save decisivedevops/d929f1bc7906baed8c55a65c9a90f23e to your computer and use it in GitHub Desktop.

Revisions

  1. decisivedevops revised this gist Jun 10, 2023. 1 changed file with 0 additions and 6 deletions.
    6 changes: 0 additions & 6 deletions .vimrc
    Original file line number Diff line number Diff line change
    @@ -17,12 +17,6 @@ cnoremap w!! execute 'silent! write !sudo tee % >/dev/null' <bar> edit!
    " status line
    set statusline=%F%m%r%h%w%=(%{&ff}/%Y)\ (line\ %l\/%L,\ col\ %c)

    " set backup of files
    set backupdir=~/.vim/.backup//

    " set swap file directory
    set directory=$HOME/.vim/swp//

    " show status line
    set laststatus=2

  2. decisivedevops created this gist Jun 10, 2023.
    40 changes: 40 additions & 0 deletions .vimrc
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,40 @@
    " Use Vim settings, rather then Vi settings. It’s important to have this on the top of your file, as it influences other options.
    set nocompatible

    " add a line below cursor
    set cursorline

    " show line numbers
    set nu
    set relativenumber

    " Disable beep on errors
    set noerrorbells

    " bypass sudo when file is not opened using sudo vim <filename>
    cnoremap w!! execute 'silent! write !sudo tee % >/dev/null' <bar> edit!
    " status line
    set statusline=%F%m%r%h%w%=(%{&ff}/%Y)\ (line\ %l\/%L,\ col\ %c)

    " set backup of files
    set backupdir=~/.vim/.backup//

    " set swap file directory
    set directory=$HOME/.vim/swp//

    " show status line
    set laststatus=2

    " Display command line's tab complete options as a menu.
    set wildmenu

    " Maintain undo history between sessions
    set undofile
    set undodir=~/.vim/undodir

    " Shortcutting split navigation
    map <C-h> <C-w>h
    map <C-j> <C-w>j
    map <C-k> <C-w>k
    map <C-l> <c-w>l