《Disney +》 迪士尼、Marvel、彼思、星球大戰…  大逃殺手遊「FINAL FANTASY VII THE FIRST SOLDIER」事前登錄人數突破100萬!   最後一位!大亂鬥SP最終新增鬥士將於10月5日22點發表!   即將發售!總監野村哲也在採訪中深入探討於「FINAL FANTASY VII REMAKE INTERGRADE」亮相的全新尤菲!   原神2.1版本更新:在提瓦特世界和亞蘿伊一起狩獵吧!   深入一窺《Stray》充滿未來感的神祕世界   體壇與電競合作!Nike與PlayStation、NBA職業球員保羅·喬治(Paul George)合作推出聯名系列「PG 5 PS EP」!   重大更新?「集合啦!動物森友會 Direct 2021.10.15」確定播出!   人氣VTuber彩虹社推出《快打旋風V》社團活動「#にじストV部」!長達6小時對戰直播! 

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

隨機商業新聞