You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
54 lines
1.4 KiB
54 lines
1.4 KiB
set encoding=utf-8
|
|
|
|
" Leader
|
|
let mapleader=" "
|
|
|
|
" Switch syntax highlighting on, when the terminal has colors
|
|
" Also switch on highlighting the last used search pattern.
|
|
if (&t_Co > 2 || has("gui_running")) && !exists("syntax_on")
|
|
syntax on
|
|
endif
|
|
|
|
set history=50
|
|
set backspace=2 " backspace deletes in insert mode
|
|
set nobackup
|
|
set nowritebackup
|
|
set noswapfile " don't write .swp files
|
|
set ruler " show cursor position all the time
|
|
set showcmd " display incomplete commands
|
|
set incsearch " incremental searching
|
|
set laststatus=2 " always show status
|
|
set autowrite " always write before commands
|
|
set nomodeline " disable modelines completely
|
|
set modelines=0
|
|
|
|
filetype plugin indent on
|
|
|
|
" Soft tabs with two spaces
|
|
set tabstop=2
|
|
set shiftwidth=2
|
|
set shiftround
|
|
set expandtab
|
|
|
|
" Display extra whitespace
|
|
set list listchars=tab:»·,trail:·,nbsp:·
|
|
|
|
" Use one space, not two, after punctuation.
|
|
set nojoinspaces
|
|
|
|
" Ripgrep configuration, if available
|
|
"
|
|
" Use The Silver Searcher https://github.com/ggreer/the_silver_searcher
|
|
if executable('rg')
|
|
" Use Ripgrep over Grep
|
|
set grepprg="rg --no-heading --color never"
|
|
|
|
" Use rg in fzf for listing files. Lightning fast and respects .gitignore
|
|
let $FZF_DEFAULT_COMMAND = 'rg --files-with-matches -F --color never --hidden -g ""'
|
|
|
|
if !exists(":Rg")
|
|
command -nargs=+ -complete=file -bar Rg silent! grep! <args>|cwindow|redraw!
|
|
nnoremap \ :Rg<SPACE>
|
|
endif
|
|
endif
|
|
|
|
|