make dotfiles stow-able
This commit is contained in:
parent
242fc85911
commit
2a0b443bc5
16 changed files with 0 additions and 0 deletions
3
nvim/.config/nvim/.gitignore
vendored
Normal file
3
nvim/.config/nvim/.gitignore
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
# neovim specific gitignore
|
||||
.netrwhist
|
||||
spell
|
41
nvim/.config/nvim/after/syntax/markdown.vim
Normal file
41
nvim/.config/nvim/after/syntax/markdown.vim
Normal file
|
@ -0,0 +1,41 @@
|
|||
" Vim syntax file
|
||||
" Language: markdown with embedded yaml, toml for Hugo
|
||||
" Author: James Wright (james@jameswright.xyz)
|
||||
" License: MIT
|
||||
" Inspired by https://github.com/pbrisbin/vim-syntax-shakespeare/blob/master/after/syntax/haskell.vim
|
||||
|
||||
" store and remove current syntax value
|
||||
if exists('b:current_syntax')
|
||||
let old_syntax = b:current_syntax
|
||||
unlet b:current_syntax
|
||||
endif
|
||||
|
||||
syn include @yaml syntax/yaml.vim
|
||||
unlet b:current_syntax
|
||||
|
||||
syn include @toml syntax/toml.vim
|
||||
unlet b:current_syntax
|
||||
|
||||
if getline(1) =~ '---'
|
||||
syn region yamlBlock matchgroup=quasiQuote start=/\%^---/ end=/^---/ contains=@yaml
|
||||
elseif getline(1) =~ '+++'
|
||||
syn region tomlBlock matchgroup=quasiQuote start=/\%^+++/ end=/^+++/ contains=@toml
|
||||
endif
|
||||
|
||||
if version < 508
|
||||
command! -nargs=+ HiLink hi link <args>
|
||||
else
|
||||
command! -nargs=+ HiLink hi def link <args>
|
||||
endif
|
||||
|
||||
|
||||
HiLink quasiQuote Boolean
|
||||
|
||||
delcommand HiLink
|
||||
|
||||
" restore current syntax value
|
||||
if exists('old_syntax')
|
||||
let b:current_syntax = old_syntax
|
||||
endif
|
||||
|
||||
setlocal ts=2 sts=2 sw=2 expandtab
|
1
nvim/.config/nvim/after/syntax/yaml.vim
Normal file
1
nvim/.config/nvim/after/syntax/yaml.vim
Normal file
|
@ -0,0 +1 @@
|
|||
setlocal ts=2 sts=2 sw=2 expandtab
|
86
nvim/.config/nvim/init.vim
Normal file
86
nvim/.config/nvim/init.vim
Normal file
|
@ -0,0 +1,86 @@
|
|||
if has('nvim')
|
||||
call plug#begin(stdpath('data') . '/plugged')
|
||||
" insert images into markdown automagically
|
||||
Plug 'ferrine/md-img-paste.vim'
|
||||
|
||||
"Better syntax
|
||||
Plug 'rust-lang/rust.vim'
|
||||
Plug 'LnL7/vim-nix'
|
||||
Plug 'cespare/vim-toml'
|
||||
Plug 'JuliaEditorSupport/julia-vim'
|
||||
|
||||
call plug#end()
|
||||
|
||||
" Incrementally show effects of :s, :smagic, :snomagic
|
||||
set icm=split
|
||||
" insert images into markdown automagically
|
||||
autocmd FileType markdown nmap <buffer><silent> <localleader>p :call mdip#MarkdownClipboardImage()<CR>
|
||||
let g:mdip_imgdir = 'static'
|
||||
let g:mdip_imgname = 'image'
|
||||
else
|
||||
set nocompatible
|
||||
filetype plugin indent on
|
||||
syntax enable
|
||||
endif
|
||||
|
||||
" disable TeX commands concealing
|
||||
let g:tex_conceal = ''
|
||||
|
||||
" space is our leader!
|
||||
let mapleader = "\<Space>"
|
||||
let maplocalleader = "\\"
|
||||
|
||||
set number relativenumber
|
||||
set nobackup
|
||||
set noswapfile
|
||||
set guicursor=
|
||||
|
||||
" autosmartident
|
||||
set ai
|
||||
set si
|
||||
set tabstop=4
|
||||
set shiftwidth=4
|
||||
set softtabstop=4
|
||||
set noexpandtab
|
||||
|
||||
" arrows for visual line identation
|
||||
imap <up> <C-O>gk
|
||||
imap <down> <C-O>gj
|
||||
nmap <up> gk
|
||||
nmap <down> gj
|
||||
vmap <up> gk
|
||||
vmap <down> gj
|
||||
|
||||
set history=999
|
||||
set undolevels=999
|
||||
|
||||
" Copy to clipboard
|
||||
vnoremap <leader>y "+y
|
||||
nnoremap <leader>Y "+yg_
|
||||
nnoremap <leader>y "+y
|
||||
nnoremap <leader>yy "+yy
|
||||
" Paste from clipboard
|
||||
nnoremap <leader>p "+p
|
||||
nnoremap <leader>P "+P
|
||||
vnoremap <leader>p "+p
|
||||
vnoremap <leader>P "+P
|
||||
|
||||
set updatetime=107
|
||||
|
||||
" markdown
|
||||
let g:markdown_syntax_conceal = 0
|
||||
let g:markdown_fenced_languages = ['c', 'html', 'python', 'scheme', 'yaml', 'sh']
|
||||
|
||||
" disable modelines
|
||||
set nomodeline
|
||||
|
||||
" change tab completion to more bash-like
|
||||
set wildmode=longest:full,list:full
|
||||
|
||||
" U is quite useless
|
||||
nnoremap U :echo "NOPE!"<CR>
|
||||
|
||||
" do not conceal stuff
|
||||
set conceallevel=0
|
||||
|
||||
set laststatus=1
|
Loading…
Add table
Add a link
Reference in a new issue