Useful snippets

    Vim multiple cursors / gn

    Mon 17. March 2025 | 2025-03-17

    multi cursor addons


    Vim gn

    cgn: enter change mode for next occurence

    1. / search for word
    2. cgn change word
    3. . repeat for next word

    Search navigate stuff

    Regex & capture groups

    Thu 16. January 2025 | 2025-01-16

    Match ett ord

    • [^\s]+
    • [a-z]+
    • \w+??

    Search replace capture group

    for รฅ replace

    - export default Component;
    + export { Component }
    

    Kan man kjรธre

    Search export default (\w+)

    Replace export { $1 }

    Se pรฅl-notater for mer...

    Newline i search replace

    search replace kan legge til newline med \n

    Inspect open menu

    Sun 29. September 2024 | 2024-09-29

    import {ComboboxItem, NativeSelect, Select} from '@mantine/core';            
    
    <Select
      id={'Flavor'}
      onDropdownOpen={() => {
        debugger;
      }}
    />

    Undo soft reset

    Mon 20. May 2024 | 2024-05-20

    git reflog

    copy hash (ex: 56e2f8f)

    git checkout main/develop
    git merge 56e2f8f