Did this ever get resolved?  I just ran into the exact same issue.  My current 
workaround is to set this:

nnoremap <leader>w :set buftype=<CR>:w<CR>

But that is a hack I should not have to do.  How does buftype get reset between 
saves?

On Thursday, June 26, 2014 at 9:02:41 AM UTC-5, Sergei G wrote:
> I just installed MacVim and I
>       loaded remote file using ssh:
>       
> 
>           scp:/hostname//path/to/file
>       
> 
>       
> 
>       It all works, but when I attempt save I get an error message:
>       
> 
>           E382: Cannot write, 'buftype' option is not set
>       
> 
>       
> 
>       I unset buffer with the command:
> 
>           :set buffer=
>       
> 
>       
> 
>       and save works.
> 
>       
> 
>       Then I change the file and attempt to save again. The save fails
>       with the same error message. I unset buffer again and save works
>       again.
> 
>       
> 
>       VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Apr 21 2014 14:54:22)
>       
> 
>       MacOS X (unix) version
>       
> 
>       Included patches: 1-258
>       
> 
>       Compiled by Bjorn Winckler <[email protected]>
>       
> 
>       Huge version with MacVim GUI.  Features included (+) or not (-):
>       
> 
>       +acl             +diff            +jumplist        +mouse_urxvt
>       +signs           +visual
>       
> 
>       +arabic          +digraphs        +keymap          +mouse_xterm
>       +smartindent     +visualextra
>       
> 
>       +autocmd         +dnd             +langmap         +multi_byte
>       -sniff           +viminfo
>       
> 
>       +balloon_eval    -ebcdic          +libcall         +multi_lang
>       +startuptime     +vreplace
>       
> 
>       +browse          +emacs_tags      +linebreak       -mzscheme
>       +statusline      +wildignore
>       
> 
>       ++builtin_terms  +eval            +lispindent      +netbeans_intg
>       -sun_workshop    +wildmenu
>       
> 
>       +byte_offset     +ex_extra        +listcmds        +odbeditor
>       +syntax          +windows
>       
> 
>       +cindent         +extra_search    +localmap        +path_extra
>       +tag_binary      +writebackup
>       
> 
>       +clientserver    +farsi           -lua             +perl
>       +tag_old_static  -X11
>       
> 
>       +clipboard       +file_in_path    +menu           
>       +persistent_undo -tag_any_white   -xfontset
>       
> 
>       +cmdline_compl   +find_in_path    +mksession       +postscript
>       -tcl             +xim
>       
> 
>       +cmdline_hist    +float           +modify_fname    +printer
>       +terminfo        -xsmp
>       
> 
>       +cmdline_info    +folding         +mouse           +profile
>       +termresponse    -xterm_clipboard
>       
> 
>       +comments        -footer          +mouseshape      +python
>       +textobjects     -xterm_save
>       
> 
>       +conceal         +fork()          +mouse_dec       -python3
>       +title           -xpm
>       
> 
>       +cryptv          +fullscreen      -mouse_gpm       +quickfix
>       +toolbar
>       
> 
>       +cscope          -gettext         -mouse_jsbterm   +reltime
>       +transparency
>       
> 
>       +cursorbind      -hangul_input    +mouse_netterm   +rightleft
>       +user_commands
>       
> 
>       +cursorshape     +iconv           +mouse_sgr       +ruby
>       +vertsplit
>       
> 
>       +dialog_con_gui  +insert_expand   -mouse_sysmouse  +scrollbind
>       +virtualedit
>       
> 
>          system vimrc file: "$VIM/vimrc"
>       
> 
>            user vimrc file: "$HOME/.vimrc"
>       
> 
>        2nd user vimrc file: "~/.vim/vimrc"
>       
> 
>             user exrc file: "$HOME/.exrc"
>       
> 
>         system gvimrc file: "$VIM/gvimrc"
>       
> 
>           user gvimrc file: "$HOME/.gvimrc"
>       
> 
>       2nd user gvimrc file: "~/.vim/gvimrc"
>       
> 
>           system menu file: "$VIMRUNTIME/menu.vim"
>       
> 
>         fall-back for $VIM:
>       "/Applications/MacVim.app/Contents/Resources/vim"
>       
> 
>       Compilation: clang -c -I. -Iproto -DHAVE_CONFIG_H
>       -DFEAT_GUI_MACVIM -Wall -Wno-unknown-pragmas -pipe  -DMACOS_X_UN
>       
> 
>       IX  -g -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
>       
> 
>       Linking: clang   -L. -L/usr/local/lib -L. -L/usr/local/lib
>       -L/usr/local/lib -o Vim -framework Cocoa -framework Ca
>       
> 
>       rbon       -lm -lncurses  -liconv -framework Cocoa
>       -fstack-protector -L/usr/local/lib  -L/System/Library/Perl/5.
>       
> 
>       16/darwin-thread-multi-2level/CORE -lperl -framework Python
>       -framework Ruby

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui