Skip to content

Instantly share code, notes, and snippets.

@abuturabofficial
Last active December 12, 2021 11:12
Show Gist options
  • Select an option

  • Save abuturabofficial/9a6034b5c5b5b9f299b05ccea6e2d8be to your computer and use it in GitHub Desktop.

Select an option

Save abuturabofficial/9a6034b5c5b5b9f299b05ccea6e2d8be to your computer and use it in GitHub Desktop.

Revisions

  1. Sajid Mahmood revised this gist Dec 12, 2021. 1 changed file with 3 additions and 2 deletions.
    5 changes: 3 additions & 2 deletions vimconf
    Original file line number Diff line number Diff line change
    @@ -88,6 +88,7 @@ set wildignore=*.docx,*.jpg,*.png,*.gif,*.pdf,*.pyc,*.exe,*.flv,*.img,*.xlsx

    ###
    Adding plugins
    linux: $ curl -fLo ~/.vim/autoload/plug.vim --create-dirs \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
    linux/mac: $ curl -fLo ~/.vim/autoload/plug.vim --create-dirs \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
    windows: $ iwr -useb https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim |` ni $HOME/vimfiles/autoload/plug.vim -Force
    ####

    ####
  2. Sajid Mahmood revised this gist Dec 12, 2021. 1 changed file with 8 additions and 0 deletions.
    8 changes: 8 additions & 0 deletions vimconf
    Original file line number Diff line number Diff line change
    @@ -83,3 +83,11 @@ set wildmode=list:longest
    " There are certain files that we would never want to edit with Vim.
    " Wildmenu will ignore files with these extensions.
    set wildignore=*.docx,*.jpg,*.png,*.gif,*.pdf,*.pyc,*.exe,*.flv,*.img,*.xlsx



    ###
    Adding plugins
    linux: $ curl -fLo ~/.vim/autoload/plug.vim --create-dirs \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim

    ####
  3. Sajid Mahmood revised this gist Dec 12, 2021. 1 changed file with 5 additions and 1 deletion.
    6 changes: 5 additions & 1 deletion vimconf
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,8 @@

    .vim/
    ├── autoload/
    ├── backup/
    ├── colors/
    └── plugged/

    $ mkdir -p ~/.vim ~/.vim/autoload ~/.vim/backup ~/.vim/color ~/.vim/plugged

  4. Sajid Mahmood created this gist Dec 12, 2021.
    81 changes: 81 additions & 0 deletions vimconf
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,81 @@


    $ mkdir -p ~/.vim ~/.vim/autoload ~/.vim/backup ~/.vim/color ~/.vim/plugged

    $ touch ~/.vimrc

    " Disable compatibility with vi which can cause unexpected issues.
    set nocompatible

    " Enable type file detection. Vim will be able to try to detect the type of file in use.
    filetype on

    " Enable plugins and load plugin for the detected file type.
    filetype plugin on

    " Load an indent file for the detected file type.
    filetype indent on

    " Turn syntax highlighting on.
    syntax on

    " Add numbers to each line on the left-hand side.
    set number
    " Highlight cursor line underneath the cursor horizontally.
    set cursorline

    " Highlight cursor line underneath the cursor vertically.
    set cursorcolumn

    " Set shift width to 4 spaces.
    set shiftwidth=4

    " Set tab width to 4 columns.
    set tabstop=4

    " Use space characters instead of tabs.
    set expandtab

    " Do not save backup files.
    set nobackup

    " Do not let cursor scroll below or above N number of lines when scrolling.
    set scrolloff=10

    " Do not wrap lines. Allow long lines to extend as far as the line goes.
    set nowrap

    " While searching though a file incrementally highlight matching characters as you type.
    set incsearch

    " Ignore capital letters during search.
    set ignorecase

    " Override the ignorecase option if searching for capital letters.
    " This will allow you to search specifically for capital letters.
    set smartcase

    " Show partial command you type in the last line of the screen.
    set showcmd

    " Show the mode you are on the last line.
    set showmode

    " Show matching words during a search.
    set showmatch

    " Use highlighting when doing a search.
    set hlsearch

    " Set the commands to save in history default number is 20.
    set history=1000

    " Enable auto completion menu after pressing TAB.
    set wildmenu

    " Make wildmenu behave like similar to Bash completion.
    set wildmode=list:longest

    " There are certain files that we would never want to edit with Vim.
    " Wildmenu will ignore files with these extensions.
    set wildignore=*.docx,*.jpg,*.png,*.gif,*.pdf,*.pyc,*.exe,*.flv,*.img,*.xlsx