Useful snippets

    Neovim WSL copy to Windows system clipboard

    Tue 13. February 2024 | 2024-02-13

    EDIT:

    unnamedplus funker for WSL. men bare ikke i windows 11 ser det ut som?

    See if Neovim lacks Clipboard

    :CheckHealth
    
    Clipboard (optional) ~
    - WARNING No clipboard tool found. Clipboard registers (`"+` and `"*`) will not work.
      - ADVICE:
        - :help |clipboard|
    

    Clipboard help: https://useful-snippets.netlify.app/posts/neovim-reference-manual/

    Copy entire line

    1. Select entire line visual mode
    2. Enter command:
    :'<,'>w !clip.exe

    https://stackoverflow.com/questions/61550552/how-to-copy-paste-from-vim-in-wsl

    Click & drag method

    1. :set mouse= Neovim config already has this set as default
    2. Click & drag
    3. Ctrl C

    Should be able to paste text content anywhere else

    copy from vim wsl

    Image: Copy paste " - Javascript" to OS system clipboard


    set clipboard+=unnamed funker for Ideavim (.ideavimrc). Neovim gjennom WSL trenger kanskje mer verktøy for å funke

    Repeatedly run same command

    Tue 06. February 2024 | 2024-02-06

    Run "npm run build" 10 times

    for i in {1..10}; do npm run build; done

    Wait beetween commands

    for i in {1..10}; do npm run build && sleep 1; done

    Tmux

    Wed 24. January 2024 | 2024-01-24

    Enter copy mode

    Ctrl [ eller begynn å scrolle

    Quit copy mode

    Ctrl c eller q

    https://stackoverflow.com/questions/67360866/tmux-exit-ctrl-b-and-stay-observing-the-session

    detach og tmux-attach:

    https://askubuntu.com/questions/824496/how-do-i-access-tmux-session-after-i-leave-it

    List sessions

    Navigate between sessions in tmux

    Ctrl b s

    Just list sessions

    tmux ls

    Med christoomey/vim-tmux-navigator package og instrukser fra https://www.josean.com/posts/tmux-setup / https://www.youtube.com/watch?v=U-omALWIBos&t=584s

    Resize pane

    Ctrl b h eller j eller k eller l

    Move between panes

    Ctrl h eller j eller k eller l

    Vim

    Wed 24. January 2024 | 2024-01-24

    https://vim.rtorr.com/

    Webstorm IdeaVim Shortcut settings

    Sun 21. January 2024 | 2024-01-21

    Setup

    Install IdeaVim plugin

    Setup ctrl Q for toggling Vim on/off

    Keymaps

    Settings

    Turn Vim on

    reserve certain shortcuts to IDE

    like:

    • ctrl Q so we can toggle Vim efficiently
    • ctrl C to enable copying to OS registry
    • ctrl V to enable pasting from OS registry

    settings