Changes between Version 30 and Version 31 of linux/VCS/Mercurial


Ignore:
Timestamp:
Mar 6, 2016, 4:46:15 PM (3 years ago)
Author:
mutetella
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • linux/VCS/Mercurial

    v30 v31  
    207207}}}
    208208
     209== Open specific revision of a file with vim
     210
     211Suppose we want open the last revision of a python file:
     212
     213{{{
     214$ hg cat [FILENAME] -r -1 | vim - +"filetype=python" +"%unfold!"
     215}}}
     216
     217This will show the last (→ `-r -1`) revision of [FILENAME] and pipe the result to vim which reads from stdin (→ `-`) sets the filetype to python (→ `+"filetype=python"`) and open all folds within the file (→ `+"%unfold!"`).
     218
    209219= Manage a dotfiles-repo
    210220