Skip to content

Instantly share code, notes, and snippets.

@ijjvim
Forked from mendeza/.vimrc
Created April 6, 2022 07:36
Show Gist options
  • Select an option

  • Save ijjvim/9085c3a8ebd377af971cc4f1e81cf149 to your computer and use it in GitHub Desktop.

Select an option

Save ijjvim/9085c3a8ebd377af971cc4f1e81cf149 to your computer and use it in GitHub Desktop.

Revisions

  1. Aaron Mendez revised this gist May 2, 2021. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion .vimrc
    Original file line number Diff line number Diff line change
    @@ -109,7 +109,7 @@ let g:netrw_browse_split = 3
    call plug#begin('~/.local/share/nvim/plugged')

    " Make sure to use single quotes
    " Install with ':PlugInstall'
    " Install with `:PlugInstall`

    " https://github.com/itchyny/lightline.vim
    Plug 'itchyny/lightline.vim'
  2. Aaron Mendez revised this gist May 2, 2021. 1 changed file with 85 additions and 18 deletions.
    103 changes: 85 additions & 18 deletions .vimrc
    Original file line number Diff line number Diff line change
    @@ -1,10 +1,17 @@
    " (N)Vim Configuration File
    " vim : place in $HOME/.vimrc
    " nvim : place in $HOME/.config/nvim/init.vim
    " $ ln -s $HOME/.config/nvim/init.vim $HOME/.vimrc
    " General settings
    " https://learnvimscriptthehardway.stevelosh.com/
    " ---------------------------------------------------------------------------
    " drop vi support - kept for vim compatibility but not needed for nvim
    set nocompatible
    " Probably not needed with Vim 8+
    "set nocompatible

    " Search recursively downward from CWD; provides TAB completion for filenames
    " e.g., `:find vim* <TAB>`
    set path+=**

    " number of lines at the beginning and end of files checked for file-specific vars
    set modelines=0
    @@ -17,8 +24,6 @@ au FocusGained,BufEnter * :silent! !

    " use Unicode
    set encoding=utf-8
    set fenc=utf-8
    set fencs=iso-2022-jp,euc-jp,cp932

    " errors flash screen rather than emit beep
    set visualbell
    @@ -78,22 +83,84 @@ set laststatus=2 statusline=%F

    " Use system clipboard
    " http://vim.wikia.com/wiki/Accessing_the_system_clipboard
    set clipboard=unnamedplus
    " for linux
    "set clipboard=unnamedplus
    " for macOS
    set clipboard=unnamed

    " Folding
    " https://vim.fandom.com/wiki/Folding
    " https://vim.fandom.com/wiki/All_folds_open_when_opening_a_file
    " https://stackoverflow.com/questions/8316139/how-to-set-the-default-to-unfolded-when-you-open-a-file
    set foldmethod=indent
    set foldnestmax=1
    set foldlevelstart=1

    " netrw and vim-vinegar
    let g:netrw_browse_split = 3

    " Plugins, syntax, and colors
    " ---------------------------------------------------------------------------
    " vim-plug
    " https://github.com/junegunn/vim-plug
    " Specify a directory for plugins
    " - For Neovim: ~/.local/share/nvim/plugged
    " - Avoid using standard Vim directory names like 'plugin'
    call plug#begin('~/.local/share/nvim/plugged')

    " Show character column
    highlight ColorColumn ctermbg=DarkBlue
    set colorcolumn=80
    " Make sure to use single quotes
    " Install with ':PlugInstall'

    " CursorLine - sometimes autocmds are not performant; turn off if so
    " http://vim.wikia.com/wiki/Highlight_current_line
    set cursorline
    " Normal mode
    highlight CursorLine ctermbg=None
    autocmd InsertEnter * highlight CursorLine ctermbg=17 ctermfg=None
    autocmd InsertLeave * highlight CursorLine ctermbg=None ctermfg=None
    " https://github.com/itchyny/lightline.vim
    Plug 'itchyny/lightline.vim'

    " https://github.com/tpope/vim-commentary
    Plug 'tpope/vim-commentary'

    " https://github.com/tpope/vim-surround
    Plug 'tpope/vim-surround'

    " https://github.com/tpope/vim-vinegar
    Plug 'tpope/vim-vinegar'

    " https://github.com/APZelos/blamer.nvim
    Plug 'APZelos/blamer.nvim'

    " https://github.com/fenetikm/falcon/wiki/Installation
    Plug 'fenetikm/falcon'

    " https://github.com/macguirerintoul/night_owl_light.vim
    Plug 'macguirerintoul/night_owl_light.vim'

    " Initialize plugin system
    call plug#end()

    " Colors
    " ---------------------------------------------------------------------------
    syntax enable
    set background=dark
    " ---------------------------------------------------------------------------
    " Neovim only
    set termguicolors

    " Light scheme
    colorscheme night_owl_light

    " Dark scheme
    "colorscheme falcon
    "set background=dark

    " Show character column
    set colorcolumn=80

    " lightline config - add file 'absolutepath'
    " Delete colorscheme line below if using Dark scheme

    let g:lightline = {
    \ 'colorscheme': 'PaperColor_light',
    \ 'active': {
    \ 'left': [ [ 'mode', 'paste' ],
    \ [ 'readonly', 'absolutepath', 'modified' ] ]
    \ }
    \ }

    let g:blamer_enabled = 1
    " %a is the day of week, in case it's needed
    let g:blamer_date_format = '%e %b %Y'
    highlight Blamer guifg=darkorange
  3. Aaron Mendez created this gist Dec 6, 2016.
    99 changes: 99 additions & 0 deletions .vimrc
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,99 @@
    " (N)Vim Configuration File
    " vim : place in $HOME/.vimrc
    " nvim : place in $HOME/.config/nvim/init.vim
    " General settings
    " ---------------------------------------------------------------------------
    " drop vi support - kept for vim compatibility but not needed for nvim
    set nocompatible

    " number of lines at the beginning and end of files checked for file-specific vars
    set modelines=0

    " reload files changed outside of Vim not currently modified in Vim (needs below)
    set autoread

    " http://stackoverflow.com/questions/2490227/how-does-vims-autoread-work#20418591
    au FocusGained,BufEnter * :silent! !

    " use Unicode
    set encoding=utf-8
    set fenc=utf-8
    set fencs=iso-2022-jp,euc-jp,cp932

    " errors flash screen rather than emit beep
    set visualbell

    " make Backspace work like Delete
    set backspace=indent,eol,start

    " don't create `filename~` backups
    set nobackup

    " don't create temp files
    set noswapfile

    " line numbers and distances
    set relativenumber
    set number

    " number of lines offset when jumping
    set scrolloff=2

    " Tab key enters 2 spaces
    " To enter a TAB character when `expandtab` is in effect,
    " CTRL-v-TAB
    set expandtab tabstop=2 shiftwidth=2 softtabstop=2

    " Indent new line the same as the preceding line
    set autoindent

    " statusline indicates insert or normal mode
    set showmode showcmd

    " make scrolling and painting fast
    " ttyfast kept for vim compatibility but not needed for nvim
    set ttyfast lazyredraw

    " highlight matching parens, braces, brackets, etc
    set showmatch

    " http://vim.wikia.com/wiki/Searching
    set hlsearch incsearch ignorecase smartcase

    " As opposed to `wrap`
    "set nowrap

    " http://vim.wikia.com/wiki/Set_working_directory_to_the_current_file
    set autochdir

    " open new buffers without saving current modifications (buffer remains open)
    set hidden

    " http://stackoverflow.com/questions/9511253/how-to-effectively-use-vim-wildmenu
    set wildmenu wildmode=list:longest,full

    " StatusLine always visible, display full path
    " http://learnvimscriptthehardway.stevelosh.com/chapters/17.html
    set laststatus=2 statusline=%F

    " Use system clipboard
    " http://vim.wikia.com/wiki/Accessing_the_system_clipboard
    set clipboard=unnamedplus

    " Show character column
    highlight ColorColumn ctermbg=DarkBlue
    set colorcolumn=80

    " CursorLine - sometimes autocmds are not performant; turn off if so
    " http://vim.wikia.com/wiki/Highlight_current_line
    set cursorline
    " Normal mode
    highlight CursorLine ctermbg=None
    autocmd InsertEnter * highlight CursorLine ctermbg=17 ctermfg=None
    autocmd InsertLeave * highlight CursorLine ctermbg=None ctermfg=None

    " Colors
    " ---------------------------------------------------------------------------
    syntax enable
    set background=dark
    " ---------------------------------------------------------------------------