mirror of
https://github.com/tiyn/dotfiles.git
synced 2025-03-30 07:57:46 +02:00
vim: added nim support
This commit is contained in:
parent
911d34f0be
commit
7bed363ef2
@ -10,6 +10,7 @@ endif
|
|||||||
|
|
||||||
call plug#begin('~/.local/share/nvim/plugged')
|
call plug#begin('~/.local/share/nvim/plugged')
|
||||||
Plug 'airblade/vim-gitgutter' " git upgrades
|
Plug 'airblade/vim-gitgutter' " git upgrades
|
||||||
|
Plug 'alaviss/nim.nvim' , {'for': 'nim'} " Highlighting for nim
|
||||||
Plug 'alvan/vim-closetag' " auto close HTML tags
|
Plug 'alvan/vim-closetag' " auto close HTML tags
|
||||||
Plug 'donRaphaco/neotex' , {'for': 'tex'} " asynchronous pdf rendering
|
Plug 'donRaphaco/neotex' , {'for': 'tex'} " asynchronous pdf rendering
|
||||||
Plug 'frazrepo/vim-rainbow' " colorized matching brackets
|
Plug 'frazrepo/vim-rainbow' " colorized matching brackets
|
||||||
@ -276,6 +277,7 @@ autocmd BufWritePre * :call TrimWhitespace()
|
|||||||
autocmd BufRead,BufNewFile *.tex set filetype=tex
|
autocmd BufRead,BufNewFile *.tex set filetype=tex
|
||||||
autocmd BufRead,BufNewFile *.html set filetype=html
|
autocmd BufRead,BufNewFile *.html set filetype=html
|
||||||
autocmd BufRead,BufNewFile *.h set filetype=c
|
autocmd BufRead,BufNewFile *.h set filetype=c
|
||||||
|
autocmd BufRead,BufNewFile *.nim set filetype=nim
|
||||||
|
|
||||||
" formatting options
|
" formatting options
|
||||||
autocmd FileType java setlocal shiftwidth=2 softtabstop=2
|
autocmd FileType java setlocal shiftwidth=2 softtabstop=2
|
||||||
@ -287,6 +289,7 @@ autocmd FileType html noremap <F8> :silent %!tidy -q -i --show-errors 0 <CR>
|
|||||||
autocmd FileType java setlocal formatprg=astyle\ --indent=spaces=2\ --style=google
|
autocmd FileType java setlocal formatprg=astyle\ --indent=spaces=2\ --style=google
|
||||||
autocmd FileType java noremap <F8> gggqG
|
autocmd FileType java noremap <F8> gggqG
|
||||||
autocmd FileType markdown noremap <F8> :silent %!prettier --stdin-filepath % <CR>
|
autocmd FileType markdown noremap <F8> :silent %!prettier --stdin-filepath % <CR>
|
||||||
|
autocmd FileType nim noremap <F8> :silent !nimpretty %<CR>
|
||||||
autocmd FileType python setlocal formatprg=autopep8\ -
|
autocmd FileType python setlocal formatprg=autopep8\ -
|
||||||
autocmd FileType python noremap <F8> gggqG
|
autocmd FileType python noremap <F8> gggqG
|
||||||
autocmd FileType tex,latex setlocal formatprg=latexindent\ -
|
autocmd FileType tex,latex setlocal formatprg=latexindent\ -
|
||||||
|
@ -32,6 +32,7 @@ case "$file" in
|
|||||||
*\.md) pandoc "$file" --pdf-engine=xelatex -o "$base".pdf ;;
|
*\.md) pandoc "$file" --pdf-engine=xelatex -o "$base".pdf ;;
|
||||||
*config.h) sudo make install ;;
|
*config.h) sudo make install ;;
|
||||||
*\.c) if [ -f Makefile ]; then make run; else cc "$file" -o "$base" && "$base"; fi ;;
|
*\.c) if [ -f Makefile ]; then make run; else cc "$file" -o "$base" && "$base"; fi ;;
|
||||||
|
*\.nim) nim c "$file" && "$base" ;;
|
||||||
*\.py) python "$file" ;;
|
*\.py) python "$file" ;;
|
||||||
*\.go) go run "$file" ;;
|
*\.go) go run "$file" ;;
|
||||||
*\.sent) setsid sent "$file" 2>/dev/null & ;;
|
*\.sent) setsid sent "$file" 2>/dev/null & ;;
|
||||||
|
1
.profile
1
.profile
@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
# Adds `~/.local/bin` and all subdirectories to $PATH
|
# Adds `~/.local/bin` and all subdirectories to $PATH
|
||||||
export PATH="$PATH:$(du "${HOME}/.local/bin/" | cut -f2 | tr '\n' ':' | sed 's/:*$//')"
|
export PATH="$PATH:$(du "${HOME}/.local/bin/" | cut -f2 | tr '\n' ':' | sed 's/:*$//')"
|
||||||
|
export PATH=/home/user/.nimble/bin:$PATH
|
||||||
|
|
||||||
export BROWSER="icecat"
|
export BROWSER="icecat"
|
||||||
export RTV_BROWSER="qutebrowser"
|
export RTV_BROWSER="qutebrowser"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user