agl / pond

Pond
BSD 3-Clause "New" or "Revised" License
911 stars 109 forks source link

Consider additional vim arguments? #196

Closed ioerror closed 9 years ago

ioerror commented 9 years ago

Currently, we set a few vim arguments ( https://github.com/agl/pond/blob/master/client/cli.go#L1691 ):

cmd := exec.Command("vim", "-n", "--cmd", "set modelines=0", "-c", "set viminfo=", "+4", "--", tempFileName)

I think we might want to consider adding the following options (-n does noswapfile but isn't as readable):

-c 'set nobackup'
-c 'set noswapfile'
-c 'set nowritebackup'

We may also want to set -N:

       -N          No-compatible mode.  Reset the 'compatible'  option.   This
                   will  make Vim behave a bit better, but less Vi compatible,
                   even though a .vimrc file does not exist.

We should probably not load plugins by using the --noplugin option:

       --noplugin  Skip loading plugins.  Implied by -u NONE.

For the console version, we might want to consider the -X option:

       -X          Don't connect to the X server.  Shortens startup time in  a
                   terminal,  but  the  window title and clipboard will not be
                   used.

Once we sandbox, we may want to consider this option:

       -m          Modifying  files  is  disabled.  Resets the 'write' option.
                   You can still modify the buffer, but writing a file is  not
                   possible.
burdges commented 9 years ago

I'm happy to submit a patch with these changes, but adam won't necessarily get to it anytime soon.