jakemason / ouroboros.nvim

Allows quickly switching between header and implementation files for C/C++ in Neovim.
MIT License
44 stars 8 forks source link

opening in a split plane? #5

Closed lukerip closed 1 year ago

lukerip commented 1 year ago

Hi, Thank you for building this. Is there any way to open the .h/.cc file in a split plane, instead of having a buffer be opened on top? Thanks!

jakemason commented 1 year ago

Hi,

Does the section in the README about splits work for this?:


If you'd like to open the result in a split, simply pipe Ouroboros to vsplit or split:

autocmd! Filetype c,cpp noremap<buffer> <leader>sv :vsplit \| Ouroboros<CR> " open result in a vertical split
autocmd! Filetype c,cpp noremap<buffer> <leader>sh :split \| Ouroboros<CR>  " open result in a horizontal split

You can use your own keybindings but the idea is the same, just pipe the Ouroboros command to the split command you prefer.

Let me know if this doesn't work and is about something else!

Thanks, Jake

lukerip commented 1 year ago

great thanks!

lukerip commented 1 year ago

(sorry i should have RTFM)

jakemason commented 1 year ago

No worries, we've all done it before :)