Advertisement
thioshp

Vim Tip: Open Last Opened File

Apr 5th, 2020
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. You can jump back to the file and line where you exited Vim.
  2. To do that right away while in vim, try
  3. using this command: >
  4.  
  5. vim -c "normal '0"
  6.  
  7. In a csh compatible shell you could make an alias for it: >
  8.  
  9. alias lvim vim -c '"'normal "'"0'"'
  10.  
  11. For a bash-like shell: >
  12.  
  13. alias lvim='vim -c "normal '\''0"'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement