Skip to content

Instantly share code, notes, and snippets.

@ryanford
Last active November 16, 2020 09:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ryanford/3f2c07116fa57e382f3563baaff5ccd1 to your computer and use it in GitHub Desktop.
Save ryanford/3f2c07116fa57e382f3563baaff5ccd1 to your computer and use it in GitHub Desktop.
My vimrc
execute pathogen#infect()
syntax on
filetype plugin indent on
set nobackup
set nowritebackup
set noswapfile
set undofile
set undolevels=500
set undodir=~/.vim/_undo
set history=100
set backspace=indent,eol,start
set autoindent
set relativenumber
set number
set ruler
set showcmd
set showmode
set incsearch
set hlsearch
set noexpandtab
set tabstop=8
set softtabstop=0
set shiftwidth=8
set hidden
set clipboard=unnamedplus
set t_BE=
packadd! matchit
set t_Co=256
colorscheme dracula
autocmd BufNewFile,BufRead .luacheckrc set filetype=lua
autocmd BufNewFile,BufRead *.tl set filetype=lua
autocmd BufNewFile,BufRead *.t set filetype=terra
autocmd BufNewFile,BufRead squishy set filetype=lua
autocmd BufNewFile,BufRead *.etlua set filetype=etlua
autocmd BufNewFile,BufRead *.hx set filetype=haxe
autocmd BufNewFile,BufRead *nginx.conf set filetype=nginx
let g:vue_disable_pre_processors=1
noremap <Leader><space> :let @/ = ""<Return>
inoremap <leader><CR> <CR><C-o>==<C-o>O
noremap <C-F12> :luafile /home/ryan/.vim/scripts/pastebin.lua<Return>
inoremap <c-F12> :luafile /home/ryan/.vim/scripts/pastebin.lua<Return>
" let g:hardtime_default_on = 1
let g:vim_markdown_folding_disabled = 1
" Add spaces after comment delimiters by default
let g:NERDSpaceDelims = 1
" Align line-wise comment delimiters flush left instead of following code indentation
let g:NERDDefaultAlign = 'left'
" Allow commenting and inverting empty lines (useful when commenting a region)
let g:NERDCommentEmptyLines = 1
" Enable trimming of trailing whitespace when uncommenting
let g:NERDTrimTrailingWhitespace = 1
let g:ale_linters = {
\ 'c': ['gcc'],
\ 'css': ['stylelint'],
\ 'html': [''],
\ 'javascript': ['jshint'],
\ 'json': ['jsonlint'],
\ 'lua': ['luacheck'],
\ 'etlua': [''],
\ 'markdown': [''],
\ 'sass': ['stylelint'],
\ 'scss': ['stylelint'],
\ 'text': [''],
\ 'typescript': ['tslint']
\}
let g:ale_c_gcc_options = '-std=c99 -Wall'
let g:ale_lua_luacheck_options = '--exclude-files *.luacheckrc'
let g:ale_sign_column_always = 1
nmap <silent> <C-k> <Plug>(ale_previous_wrap)
nmap <silent> <C-j> <Plug>(ale_next_wrap)
let g:better_whitespace_enabled=1
" show quotes in json
let g:indentLine_setConceal = ""
" default ''.
" n for Normal mode
" v for Visual mode
" i for Insert mode
" c for Command line editing, for 'incsearch'
let g:indentLine_concealcursor = ""
" disable modelines to prevent remote execution?
" set modelines=0
" set nomodeline
" use securemodelines plugin or nomodelineexpr in newer vim
" insert unix timestamp
function! Time()
lua vim.command('normal! i' .. os.time())
endfunction
nmap <Leader>t :call Time()<Return>
inoremap <leader>\ \
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment