《Disney +》 迪士尼、Marvel、彼思、星球大戰…  新咒術打卡位!1011 SIPTEA x《咒術迴戰》買飲品付送咒術週邊產品   「聖劍傳說 ECHOES of MANA」決定封閉β測試!早一步試玩的機會!   尤菲的極限爆發曝光!「FINAL FANTASY VII REMAKE INTERGRADE」、「尼祿」、「史卡蕾特 & 緋紅夢魘」美術圖以及新戰鬥系統「聯手模式」大公開!   hololive旗下VTuber湊阿庫婭&獅白牡丹加入電競大賽「Red Bull 5G」官方應援團   東京電玩展2021確定線上舉辦!同時也有現場實際活動!   「Nintendo Switch MONSTER HUNTER RISE 特別版」登場!並且推出同款設計Pro控制器!   PS Plus 會員免費暢玩魔界村!「Capcom Arcade Stadium」於 PS4・Xbox One・Steam 推出!   《Marvel’s Midnight Suns》遊戲畫面揭露 

Linux 如何離開、關閉 VIM

商業

於 Linux 最常使用的編輯器就是 VI、VIM,但是之前有流傳著,非常多人在 Stack Overflow 裡面發問,而問題就是如何離開 VIM。

  • 如果是不小心進入,想離開 VIM 的:ESC 多按幾下,然後輸入 :q! ENTER 即可

下述摘錄自此篇:vi - How do I exit the Vim editor? - Stack Overflow

  • :q to quit (short for :quit)
  • :q! to quit without saving (short for :quit!)
  • :wq to write and quit
  • :wq! to write and quit even if file has only read permission (if file does not have write permission: force write)
  • 😡 to write and quit (similar to :wq, but only write if there are changes)
  • :exit to write and exit (same as :x)
  • :qa to quit all (short for :quitall)
  • :cq to quit without saving and make Vim return non-zero error (i.e. exit with error)

Linux 如何離開、關閉 VIM

基本上,離開 Vim 比較常用的是下述:

  • 😡 + Enter (存檔 + 離開)
  • :qa + Enter (關閉全部開啟的檔案)
  • :q! + Enter (強制不存檔離開)
  • Shift ZZ (存檔 + 離開)
  • Shift ZQ (離開不要存檔)

而此篇文章整理一卡車的暴力離開 VIM 的方法:how-to-exit-vim/README.md at master · hakluke/how-to-exit-vim · GitHub

  • :!ps axuw | grep vim | grep -v grep | awk '{print $2}' | xargs kill -9
  • python -c "from os import system; system('killall -9 vim')"
  • timeout 600 vim
  • ... 上述摘錄自文章,都很暴力的作法~
Tsung

隨機商業新聞

Disney Plus