metakirby5 / codi.vim

:notebook_with_decorative_cover: The interactive scratchpad for hackers.
MIT License
3.04k stars 84 forks source link

codi from shell wrapper with filename not allowing input #63

Open rbowden91 opened 7 years ago

rbowden91 commented 7 years ago

I'm on OS X, with a compiled-from-source vim 8. Basically my entire vimrc, minus Vundle stuff for codi, is commented out. When I try opening with a filename, I can't type anything. If the filename happens to be an existing file, I can type, but nothing shows up in the codi righthand side (this isn't shown in the screencast).

https://asciinema.org/a/0s5bg7nndgc5cn96s01dbrrwk

Script: BSD December 4, 2013 BSD

Vim version: http://pastebin.com/pcQ34Nba Codi log (for the error case): http://pastebin.com/i2xZuEh9

metakirby5 commented 7 years ago

Would you mind pasting your shell wrapper code? It's possible that you're using an old revision of it which had a bug.

rbowden91 commented 7 years ago

Yeah, I think I'm using the most recent version in the README. Thanks for your help!!

# Codi
# Usage: codi [filetype] [filename]
codi() {
  local syntax="${1:-python}"
  shift
  vim -c \
    "let g:startify_disable_at_vimenter = 1 |\
    set bt=nofile ls=0 noru nonu nornu |\
    hi ColorColumn ctermbg=NONE |\
    hi VertSplit ctermbg=NONE |\
    hi NonText ctermfg=0 |\
    Codi $syntax" "$@"
}
metakirby5 commented 7 years ago

Unfortunately, I can't seem to reproduce this :( To narrow down what might be causing the problem, could you try reproducing this with the synchronous flag set?

rbowden91 commented 7 years ago

That didn't fix things for me. However, if I remove the "set buftype=nofile" from the shell command, then things seem to work perfectly fine. Is that supposed to prevent quit warnings on that right-side buffer??

rbowden91 commented 7 years ago

Sorry, "bt=nofile"