Skip to content

Instantly share code, notes, and snippets.

@Nyubis
Last active January 9, 2018 07:37
Show Gist options
  • Select an option

  • Save Nyubis/658df58ac56d1d6f81033340bfbe7b4b to your computer and use it in GitHub Desktop.

Select an option

Save Nyubis/658df58ac56d1d6f81033340bfbe7b4b to your computer and use it in GitHub Desktop.

Revisions

  1. Nyubis revised this gist Jan 9, 2018. 1 changed file with 38 additions and 5 deletions.
    43 changes: 38 additions & 5 deletions .vimrc
    Original file line number Diff line number Diff line change
    @@ -5,11 +5,16 @@ set rtp+=~/.vim/bundle/Vundle.vim

    call vundle#begin()
    Plugin 'gmarik/Vundle.vim'
    Plugin 'bling/vim-airline'
    Plugin 'vim-airline/vim-airline'
    Plugin 'vim-airline/vim-airline-themes'
    Plugin 'wting/rust.vim'
    Plugin 'kien/ctrlp.vim'
    Plugin 'justinmk/vim-sneak'
    Plugin 'terryma/vim-multiple-cursors'
    call vundle#end()
    let g:airline_powerline_fonts=1

    let g:airline_left_sep=' '
    let g:airline_right_sep=' '
    set laststatus=2

    "" General
    @@ -23,14 +28,17 @@ set cursorline
    syntax on
    filetype plugin indent on
    cmap w!! w !sudo tee % > /dev/null
    set suffixes=.bak,~,.swp,.o,.info,.aux,.log,.dvi,.bbl,.blg,.brf,.cb,.ind,.idx,.ilg,.inx,.out,.toc,.png,.jpg

    "" Theme + fixes
    let $NVIM_TUI_ENABLE_TRUE_COLOR=1 "(neovim only) use 2^24 colors instead of 256
    colorscheme molokai
    let g:molokai_original=1 "Better background color
    let g:airline_theme='bubblegum'
    let $NVIM_TUI_ENABLE_TRUE_COLOR=1 "(neovim only) use 2^24 colors instead of 256
    hi SpecialKey gui=none
    hi Special gui=none
    " Have matching paren highlighting not be confusing with cursor
    hi MatchParen cterm=underline ctermfg=none ctermbg=none

    "" Whitespace
    set tabstop=4
    @@ -39,19 +47,44 @@ set scrolloff=3 "Leave 3 lines of space below/above cursor when scrolling
    set nowrap
    "" Show invisible characters. ctermfg 0 should be a low-contrast colour
    set list
    set listchars=tab:\ ,trail:·
    set listchars=tab:»\ ,trail:·
    hi SpecialKey ctermfg=0

    "" Searching
    set hlsearch
    set incsearch
    set ignorecase
    set smartcase
    " Clear highlight by pressing esc in normal mode
    nnoremap <esc><esc> :noh<return><esc>
    "" vim-sneak using s in command mode because we don't use surround.vim
    omap s <Plug>Sneak_s
    omap S <Plug>Sneak_S
    " "" Fix magic mode
    " nnoremap / /\v
    " vnoremap / /\v
    " cnoremap %s/ %smagic/
    " cnoremap \>s/ \>smagic/
    " nnoremap :g/ :g/\v
    " nnoremap :g// :g//

    "" Tab switching
    nnoremap <F7> :tabprevious<CR>
    nnoremap <F8> :tabnext<CR>
    inoremap <F7> <Esc>:tabprevious<CR>
    inoremap <F8> <Esc>:tabnext<CR>
    tnoremap <F7> <C-\><C-n>:tabprevious<CR>
    tnoremap <F8> <C-\><C-n>:tabnext<CR>
    "" Keep backup files in one place instead of littering all over
    set backupdir=~/.vim/.backup
    set directory=~/.vim/.backup
    set directory=~/.vim/.backup

    "" Command for writing text rather than code
    function! Writing()
    set wrap
    set linebreak
    set nolist
    set spell
    endfunction
  2. Nyubis created this gist Apr 18, 2016.
    57 changes: 57 additions & 0 deletions .vimrc
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,57 @@
    ""Plugins
    set nocompatible
    filetype off
    set rtp+=~/.vim/bundle/Vundle.vim

    call vundle#begin()
    Plugin 'gmarik/Vundle.vim'
    Plugin 'bling/vim-airline'
    Plugin 'wting/rust.vim'
    Plugin 'kien/ctrlp.vim'
    call vundle#end()
    let g:airline_powerline_fonts=1
    set laststatus=2

    "" General
    set backspace=2
    set showcmd
    set number
    set relativenumber
    set t_Co=256
    set mouse=a
    set cursorline
    syntax on
    filetype plugin indent on
    cmap w!! w !sudo tee % > /dev/null
    "" Theme + fixes
    colorscheme molokai
    let g:molokai_original=1 "Better background color
    let g:airline_theme='bubblegum'
    let $NVIM_TUI_ENABLE_TRUE_COLOR=1 "(neovim only) use 2^24 colors instead of 256
    hi SpecialKey gui=none
    hi Special gui=none

    "" Whitespace
    set tabstop=4
    set shiftwidth=4
    set scrolloff=3 "Leave 3 lines of space below/above cursor when scrolling
    set nowrap
    "" Show invisible characters. ctermfg 0 should be a low-contrast colour
    set list
    set listchars=tab:→\ ,trail:·
    hi SpecialKey ctermfg=0

    "" Searching
    set hlsearch
    set incsearch
    set ignorecase
    set smartcase

    "" Tab switching
    nnoremap <F7> :tabprevious<CR>
    nnoremap <F8> :tabnext<CR>
    "" Keep backup files in one place instead of littering all over
    set backupdir=~/.vim/.backup
    set directory=~/.vim/.backup