Added debugger into neovim
Signed-off-by: Marcin Woźniak <y0rune@aol.com>
This commit is contained in:
parent
dd7d617e41
commit
4b8de442ab
@ -206,6 +206,9 @@ cnoremap w!! execute 'silent! write !sudo tee % >/dev/null' <bar> edit!
|
|||||||
map <F3> :setlocal spell! spelllang=en_gb<CR>
|
map <F3> :setlocal spell! spelllang=en_gb<CR>
|
||||||
map <F4> :setlocal spell! spelllang=pl<CR>
|
map <F4> :setlocal spell! spelllang=pl<CR>
|
||||||
|
|
||||||
|
" debugger
|
||||||
|
map <F12> :w<CR>:terminal ~/.local/bin/debugger '%:p'<CR>
|
||||||
|
|
||||||
" latex
|
" latex
|
||||||
let g:tex_flavor = "latex"
|
let g:tex_flavor = "latex"
|
||||||
autocmd BufWritePost *.tex silent! execute "!pdflatex --shell-escape -synctex=1 -interaction=nonstopmode % > /dev/null " | redraw!
|
autocmd BufWritePost *.tex silent! execute "!pdflatex --shell-escape -synctex=1 -interaction=nonstopmode % > /dev/null " | redraw!
|
||||||
|
12
.local/bin/debugger
Executable file
12
.local/bin/debugger
Executable file
@ -0,0 +1,12 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
FILE="$(readlink -f "$(echo "$*" | cut -d' ' -f2)" 2>/dev/null)"
|
||||||
|
|
||||||
|
if [ -f "$FILE" ] ; then
|
||||||
|
case "$FILE" in
|
||||||
|
*.py) python3 -m pdb "$FILE" ;;
|
||||||
|
*.sh) /bin/bash -ex "$FILE" ;;
|
||||||
|
*) printf "File \"%s\" not debugger found.\\n" "$FILE"
|
||||||
|
esac
|
||||||
|
printf "File \"%s\" not found.\\n" "$FILE"
|
||||||
|
fi
|
Loading…
Reference in New Issue
Block a user