Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] enable vim8 terminal #11

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions plugin/godebug.vim
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
" Maintainer: Luca Guidi <https://lucaguidi.com>
" Version: 0.1

if !has("nvim")
if !has("nvim") && exists('term_start')
echom "vim-godebug: vim is not yet supported, try it with neovim"
finish
endif
Expand All @@ -20,11 +20,13 @@ endif
" make cache base path overridable
if !exists("g:godebug_cache_path")
" this will probably suck for people using windows ...
let g:godebug_cache_path = $HOME . "/.cache/" . v:progname . "/vim-godebug"
let g:godebug_cache_path = fnamemodify($HOME . "/.cache/" . v:progname . "/vim-godebug", ':p:gs!\\!/!')
endif

" make sure cache base path exists
call mkdir(g:godebug_cache_path, "p")
if !isdirectory(g:godebug_cache_path)
call mkdir(g:godebug_cache_path, "p")
endif

" create a reasonably unique breakpoints file path per vim instance
let g:godebug_breakpoints_file = g:godebug_cache_path . "/". getpid() . localtime()
Expand All @@ -38,7 +40,11 @@ function! godebug#toggleBreakpoint(file, line, ...) abort
let breakpoint = "break " . a:file. ':' . a:line

" Define the sign for the gutter
exe "sign define gobreakpoint text=◉ texthl=Search"
if has('win32') && !has('gui_running')
sign define gobreakpoint text=> texthl=Search
else
sign define gobreakpoint text=◉ texthl=Search
endif

" If the line isn't already in the list, add it.
" Otherwise remove it from the list.
Expand Down