What would be the best way to have multiple ways to open a file (really just 2).
Hit enter to open a CSV file in vim and hit Ctrl-Enter to open it in Excel. I see the same need in my source code too. Sometimes i want to quick edit and other times I want to open up MacVim in a separate window, etc.
Is there a configuration path I should be looking at or some other way of thinking here?
I don't think you can get Ctrl-Enter to work (it seems to work in terminal Vim though, but I don't understand how it does that), but in general you can do:
nnoremap o !your app %f
If you want to have it more systematic, then you might want to configure associations in vifmrc:
filetype *.csv Excel %c &
filetype *.c,*.cpp MacVim %c &
nnoremap E :edit<cr>
It's somewhat inverted though, it opens Vim on E and other applications on Enter, so you might want to remap things
\ : if filetype('.', 1) == 'dir'
\ | execute 'normal! l'
\ | else
\ | execute 'normal E'
\ | endif<cr>
nnoremap o <cr>
This opens Vim on E and uses associations on Enter. The mappings won't change the behaviour of l.