Notepad++: Mark Column until End of File

后端 未结 3 1327
没有蜡笔的小新
没有蜡笔的小新 2021-01-24 22:40

It\'s a simple question, I searched in google but didn\'t find anything helpful.

I know about the column mode in Notepad++ (Alt + Left mouse click or by using

相关标签:
3条回答
  • 2021-01-24 22:56
    • Ctrl+H
    • Find what: ^\d+\h+(\d+).+$
    • Replace with: $1
    • check Wrap around
    • check Regular expression
    • DO NOT CHECK . matches newline
    • Replace all

    Explanation:

    ^       : begining of line
      \d+   : 1 or more digits
      \h+   : 1 or more horizontal spaces
      (\d+) : group 1, 1 or more digits
      .+    : 1 or more any character
    $       : end of line
    

    Replacement:

    $1      : content of group 1 (ie the second column)
    

    Result for given example:

    2942843527
    2942843813
    2942844067
    2942844321
    2942844575
    2942844837
    2942845100
    2942845345
    2942845599
    2942845845
    
    0 讨论(0)
  • 2021-01-24 23:10

    You are almost there, but add some scrolling on the scroll bar.

    1. Place your text cursor to top left corner of the column.

    2. In scroll bar on right side, drag the thumb to scroll to other end of the file.

    3. Alt + Shift + Left-click into the bottom right corner of your intended selection.

    4. Optionally, use Alt + Shift + arrows to adjust your selection as needed.

    0 讨论(0)
  • 2021-01-24 23:12

    Another way, you can try the plugin ConyEdit.
    To copy to other file, use the command line cc.gc 2w.
    To delete, use the command line cc.dc 2w.
    Explanation:

    gc: get column
    dc: delete column
    2w: second Word  
    

    If it is more complex, you can try cc.gc <nth>/<regex>/

    0 讨论(0)
提交回复
热议问题