sharat87 / ti

A simple command line time tracker.
http://ti.sharats.me
122 stars 68 forks source link

add suffix to tempfile for vim filetype options #17

Closed jceloria closed 7 years ago

jceloria commented 9 years ago

Using vim on OS X, temporary files created when dumping out the YAML are not effected by "ti edit". A work around is to 'set nowritebackup' in vim. Adding a suffix to the temp file allows one to set a custom configuration for specific file types using the ftplugin:

" File ~/.vim/ftplugin/yaml.vim " YAML specific settings.

if has("unix") let os = substitute(system('uname -s'), "\n", "", "") if os == "Darwin" set nowritebackup endif endif