open & edit current buffer in gvim
Hello everyone, here is a function that I am using to open the current buffer in gvim for editing. It's no ideal, would need your help/suggestion to make the following happen: 1. gvim starts without loading my color theme and vimrc settings - even though I tried to supply the -u option (where the concat ...), but it result in an error 2. how to inform emacs to reopen this file once editing is done in gvim, I tried several ways, but no succes thanks a lot! - Isaac -- lisp code -- (defun gvim-current-buffer () "Open current buffer file in gvim, after editing, reopen in emacs" (let ( (gvim-program "C:/Program Files (x86)/Vim/vim73/gvim.exe") (gvim-file-name (buffer-file-name (current-buffer))) ; (gvim-file-name-and-options (concat "-u " (buffer-file-name (current- buffer))) ) result) (if gvim-file-name (progn (kill-buffer (current-buffer) ) (setq result (start-process gvim-program nil gvim-program gvim-file- name))) (error "Current buffer doesn't point to a file yet")) (unless result (find-file gvim-file-name)))
participants (1)
-
Isaac Xin Pei