Blog: 2023-07-10: Difference between revisions

From razwiki
Jump to navigation Jump to search
(Created page with "Adding a control+b feature to fjord. As I do so I realize that the vim terminal opens a nested vim instance which makes the vim command line really confusing. Looks like one...")
 
No edit summary
 
(4 intermediate revisions by the same user not shown)
Line 8: Line 8:


https://superuser.com/questions/708245/re-compile-vim-with-options
https://superuser.com/questions/708245/re-compile-vim-with-options





Line 14: Line 15:
Ok so here's the flow I want to be able to do. It's using my old tmux habits. Looks like this
Ok so here's the flow I want to be able to do. It's using my old tmux habits. Looks like this


- start terminal and cd into project
* start terminal and cd into project
- open editor / tmux
* open editor / tmux
- open file in editor
* open file in editor
- switch to terminal and build
* switch to terminal and build
- switch back to file and edit
* switch back to file and edit
etc.
etc.


I tried this other terminal window manager zellij but its ui had these borders I couldn't figure out how to get rid of that were taking up a bunch of screen space.
I tried this other terminal window manager zellij but its ui had these borders I couldn't figure out how to get rid of that were taking up a bunch of screen space.


At long last I have figured out how to open vim into 2 splits:
vim '+term ++curwin' +term
Now to figure out how to open vim in the original vim session:

function vdrop --argument file
echo \x1b]'51;["drop", "'$file'"]'\x07
end

cool. but that makes a split, how to open a normal edit session, that upon being closed, just goes back to the (vim) terminal?

I think the solution is to use vim tabs, and make a custom vim terminal function to open the requested file in a new tab.

Latest revision as of 17:48, 12 July 2023

Adding a control+b feature to fjord. As I do so I realize that the vim terminal opens a nested vim instance which makes the vim command line really confusing.

Looks like one way around this is to use the vim clientserver functionality. Also something like the :drop command could be useful

But my vim doesn't come with clientserver (vim --version) so I'm installing vim from source:

$ sudo apt-get build-dep vim-gnome

https://superuser.com/questions/708245/re-compile-vim-with-options


Meanwhile I have neovim installed, but it doesn't have a termwinkey option. Huh...

Ok so here's the flow I want to be able to do. It's using my old tmux habits. Looks like this

  • start terminal and cd into project
  • open editor / tmux
  • open file in editor
  • switch to terminal and build
  • switch back to file and edit

etc.

I tried this other terminal window manager zellij but its ui had these borders I couldn't figure out how to get rid of that were taking up a bunch of screen space.


At long last I have figured out how to open vim into 2 splits:

vim '+term ++curwin' +term

Now to figure out how to open vim in the original vim session:

function vdrop --argument file
    echo \x1b]'51;["drop", "'$file'"]'\x07
end

cool. but that makes a split, how to open a normal edit session, that upon being closed, just goes back to the (vim) terminal?

I think the solution is to use vim tabs, and make a custom vim terminal function to open the requested file in a new tab.