derekwyatt / vim-fswitch

Vim plug for switching between companion source files (e.g. ".h" and ".cpp")
179 stars 57 forks source link

Fix behavior for specific user settings (spr, sb and switcbuf=useopen/usetab) #2

Closed lyokha closed 12 years ago

lyokha commented 12 years ago
  1. Commands FSSplitLeft (..Right.., ..Above.. and ..Below..) will temporarily unset 'splitright' and 'splitbelow' options and revert them back after splitting. This will fix behaviour of these commands when the options are set.
  2. Option 'switchbuf' is checked in function FSwitch() to ensure that already open buffers will be jumped to rather than opening a new window when its value is 'useopen' or 'usetab'. Jumping to an already existing buffer is achieved by using command sbuffer which knows how to do when switchbuf is 'useopen' or 'usetab' (similar solution can be found in a.vim).