OOZOU
Get in Touch
Back to TIL
vim

How to save a file with sudo in VIM

October 13, 2020
:w !sudo tee %

More on vim

vimOctober 13, 2020

How to quit Vim

1. Install latest version of Vim 2. Open a file in Vim 3. ⌘-Q and close the terminal 4. Reopen terminal

vimOctober 13, 2020

How to really!! quit vim

In terminal

vimOctober 13, 2020

Quickly move lines up and down in any Vim mode

I often move lines around in vim so I have created mappings to make this easier. These map to ⌘-j for move down and ⌘-k for move up. Works in normal, insert, and visual modes. vim nnoremap <D-j> :m…

Have a project in mind?

We'd love to hear what you're building.

Start a Conversationhello@oozou.com
OOZOU Logo

Bangkok · Singapore · Hong Kong

X
Facebook
Instagram
LinkedIn

Services

  • Web Development
  • AI Agents & Generative AI
  • Mobile App Development
  • Data Analytics & Engineering
  • UI/UX & Product Design
  • Digital Transformation

Company

  • About Us
  • Careers
  • Blog
  • Whitepapers
  • Case Studies
  • Today I Learned
  • Contact

More

  • Industries
  • Get an Estimate
  • Partner Network
© 2026 OOZOU. All rights reserved.
Privacy PolicyCode of ConductABAC Policy