Skip to content

Menu

Archives

  • June 2025
  • April 2025
  • July 2023
  • June 2023
  • December 2021
  • October 2021
  • May 2020
  • January 2020
  • October 2019

Calendar

July 2025
M T W T F S S
 123456
78910111213
14151617181920
21222324252627
28293031  
« Jun    

Categories

  • cloud
  • DB
  • GUI
  • linux
  • Linux Mint
  • logs
  • shell
  • Uncategorized

Copyright jaKubu 2025 | Theme by ThemeinProgress | Proudly powered by WordPress

jaKubu
Written by Jakub2025-06-29

Vim in cloud (draft)

cloud . linux . shell Article

But why?

Let me share my experience from using (adopting?) “vim” into Google Cloud Platform (GCP).

There is plenty of places where you can learn vi/vim basics, all its modes which confuses beginners – I’m assuming you’ve already figured it out.

For many years I’ve been using vim as a standard tool for any unix flavor. And again today, I found it was good investment! I’m new to cloud but I’m little more relaxed finding known tool… and honestly, GCP’s text editor (has it a name?) is like Windows Notepad missing the features :

  • to present non-printing characters,
  • to diff between files,
  • to lock editing,
  • regular expressions. 
  • but It’s featured with a terrible behave saving everything you type (even unintentionally).
  • …

And as you can’t ask for Notepad++, vi/vim rulez for me 😉

Keybindings

So vim is present! But the basic challenge running it in Cloud Workstation (“codespace” in CoPilot) might be keybinding of a webbrowser.

Lets say you need to compare two huge sql-scripts and you want to use:
vim -d a.sql b.sql or vimdiff a.sql b.sql.

You are now in vim’s windows1. The sequence [Ctrl]+[W], [L] should transfer you to the buffer on right side.

[Ctrl]+[W], [H]
[Ctrl]+[W], [J]
[Ctrl]+[W], [K]
[Ctrl]+[W], [L]

jump to window left
to window below (if you split veritcally)
above (if you split veritcally)
right

Instead, depending on the browser you use, you immediately leave the workbench or at the best, you get a warning you are about. I couldn’t find the way to redefine browser shortcut. Luckily vim has map -command.

Your press [Esc] to see vim prompt (‘:’) and input

:map <C-B> <C-W> 

(press [Enter])
which means that [Ctrl]+[B] is now an alias for [Ctrl]+[W]. Just memorize the new keybinding.

  1. vim’s windows – we are discussing here the feature you can learn from the help
    ([ESC] :help windows):
    Editing with multiple windows and buffers. windows buffers
    The commands which have been added to use multiple windows and buffers
    …
    ↩︎

to be continued…

Archives

  • June 2025
  • April 2025
  • July 2023
  • June 2023
  • December 2021
  • October 2021
  • May 2020
  • January 2020
  • October 2019

Calendar

July 2025
M T W T F S S
 123456
78910111213
14151617181920
21222324252627
28293031  
« Jun    

Categories

  • cloud
  • DB
  • GUI
  • linux
  • Linux Mint
  • logs
  • shell
  • Uncategorized

Copyright jaKubu 2025 | Theme by ThemeinProgress | Proudly powered by WordPress