Pages

Friday, October 27, 2023

args and buffers

link to an article

faster vim workflow with buffers and args

Args

:args *
:n / :p
:wn
:arga = add
:argd= delete

buffers

:ls
:bn /bp

substitution

  • argdo
  • bufdo
    %s/method1/method2/g | update

autocomplete in vim no plugins needed

HTML

autocmd FileType html set omnifunc=htmlcomplete#CompleteTags

  • then ctrl X ctrl o on tag to show list
  • ctrl n/ ctrl p to move through the list

CSS

autocmd FileType css set omnifunc=csscomplete#CompleteCSS

Javascript

autocmd FileType javascript set omnifunc=javascriptcomplete#CompleteJS

Filenames

  • ctrl x ctrl f
  • ctrl n/ ctrl p

Monday, October 23, 2023

vim html editing

When editing the contents of an HTML tag or changing the tag type in Vim, there are several useful shortcuts and techniques you can use:

  1. Inside Tag Editing:

    • To edit the contents within the current HTML tag, place your cursor inside the tag and press ci> (change inside >). This will change everything within the tag, but leave the tag itself intact.
  2. Changing the Tag Type:

    • To change the HTML tag itself, place your cursor on the tag you want to change, and use the following commands:
      • To change a <div> to a <span>, for example, you can use cit (change inside tag) and type <span>.
      • If you want to change a <div> to a <p>, you can use cit and type <p>.
      • To change a <span> to a <div>, you can use cit and type <div>.
  3. Tag Surroundings:

    • If you want to surround an element with a new tag, you can use the surround.vim plugin, which allows you to visually select text and then specify a new tag to surround it. For example, you can select a block of text, press S, and then type the new tag you want to wrap around it.
  4. HTML Commenting:

    • To comment out an HTML tag or a block of code, you can use the following shortcuts:
      • gcc to comment a single line.
      • :x,ys/old/new/g to replace old with new in lines x through y (e.g., :1,5s/<div>/<p>/g to replace <div> with <p> in lines 1 through 5).
  5. Changing Case:

    • To change the case of an HTML tag (e.g., from lowercase to uppercase), you can visually select the tag and use the ~ key to toggle the case.
  6. Auto-pairing Plugins:

    • Consider using Vim plugins like auto-pairs or surround.vim, which can assist in auto-closing and modifying HTML tags.

Saturday, October 21, 2023

budget friendly 60 % keyboards I saw that I liked at Canada Computers

Keyboard Price
AULA F3287 Wired TKL $29.99
Redragon K613 Jax $39.99
Redragon Kumara K552 $39.99
Redragon K616 black+red Bluetooth Wireless $49.99
Redragon Jax Pro (K613P) Bluetooth $59.99
Redragon K530 Pro-red switch 60% Wireless $64.99
60% budget keyboards I liked oct 2023

AULA F3287
k613 JAX
Kumara K552
K616 black + red
K613p JAX pro
K530 pro w red switches

Honorable mention

iCAN 87 Key Rainbow Backlit Gaming Keyboard, 1.5M Cable (Black)(Open Box)

17.99 open box

Thursday, October 19, 2023

squarebeat

ios tracker sequencer just released. it can load auv3 plugins!! its so wicked!!

a jungle demo track on youtube

doesnt have keyboard shortcuts but its been well optimized well for the small touch interface of a phone. easier than sunvox, you dont need to be a genius to use. Thats a big deal, most of the time trackers seem too complicated. its alot more like renoise reminds me a bit of lgpt. can load auv3 effects on seperate mix busses and import your own samples. its free to try but doesnt let you save or export the unlock iap is 17 bucks canadian

vim args

In Vim, "args" typically refer to the list of files you're working with, and Vim provides several shortcuts and commands to work with this argument list. Here are some common Vim shortcuts and commands for working with arguments:

  1. :args <file1> <file2> ... - Set the argument list to a specific list of files.

  2. :args *.txt - Set the argument list to all files matching a pattern (e.g., all .txt files in the current directory).

  3. :argadd <file> - Add a file to the argument list.

  4. :argdelete - Remove the current file from the argument list.

  5. :args - List all files in the current argument list.

  6. :argnext (or :an) - Go to the next file in the argument list.

  7. :argprev (or :ap) - Go to the previous file in the argument list.

  8. :argfirst - Go to the first file in the argument list.

  9. :arglast - Go to the last file in the argument list.

  10. :argdo <command> - Execute a command on all files in the argument list. For example, :argdo :%s/foo/bar/g would replace "foo" with "bar" in all files.

  11. :args $mylist - Set the argument list from a variable.

  12. :argopen - Open all files in the argument list in separate windows.

  13. :arglist - Display the argument list and the cursor position within each file.

Wednesday, October 18, 2023

AFP Share: open raspberri pi using mac finder

sudo apt install netatalk

sudo nano /etc/netatalk/afp.conf

** inside that file add to bottom **

[Homes]

  basedir regex = /home

sudo systemctl restart netatalk

how to set up a pip venv

sudo apt install python3-venv python3 -m venv myenv source myenv/bin/activate pip install package-name deactivate

urls

https://www.youtube.com/feeds/videos.xml?channel_id=UCked4Esmdl16F1CwHjiBe3w https://www.youtube.com/feeds/videos.xml?channel_id=%20UCuQRDVBQP6kL5kcgm8s8WQA https://www.youtube.com/feeds/videos.xml?channel_id=UC2Xd-TjJByJyK2w1zNwY0zQ https://www.youtube.com/feeds/videos.xml?channel_id=UCld68syR8Wi-GY_n4CaoJGA https://www.youtube.com/feeds/videos.xml?channel_id=UCngn7SVujlvskHRvRKc1cTw https://www.chch.com/feed/ https://www.youtube.com/feeds/videos.xml?channel_id=UCX6b17PVsYBQ0ip5gyeme-Q https://ecksesontress.blogspot.com/feeds/posts/default https://www.youtube.com/feeds/videos.xml?channel_id=UCbiGcwDWZjz05njNPrJU7jA https://www.youtube.com/feeds/videos.xml?channel_id=UCsBjURrPoezykLs9EqgamOA https://www.youtube.com/feeds/videos.xml?channel_id=UCNmTQerbBm8AFzXYYvs1ywQ https://news.itsfoss.com/latest/rss https://www.youtube.com/feeds/videos.xml?channel_id=UC2eYFnH61tmytImy1mTYvhA https://www.youtube.com/feeds/videos.xml?channel_id=UC7YOGHUfC1Tb6E4pudI9STA https://www.youtube.com/feeds/videos.xml?channel_id=UCKQdc0-Targ4nDIAUrlfKiA https://www.youtube.com/feeds/videos.xml?channel_id=UCYVU6rModlGxvJbszCclGGw https://www.youtube.com/feeds/videos.xml?channel_id=UC8ENHE5xdFSwx71u3fDH5Xw https://www.youtube.com/feeds/videos.xml?channel_id=UCUyeluBRhGPCW4rPe_UvBZQ https://www.youtube.com/feeds/videos.xml?channel_id=UCn8zNIfYAQNdrFRrr8oibKw https://www.youtube.com/feeds/videos.xml?playlist_id=PL-p5XmQHB_JSTaEPygu1DZjuFfb704Uv7 https://www.youtube.com/feeds/videos.xml?channel_id=UCFbNIlppjAuEX4znoulh0Cw https://www.cbc.ca/cmlink/rss-topstories "Canada" https://www.ctvnews.ca/rss/ctvnews-ca-top-stories-public-rss-1.822009 "Canada" https://business.financialpost.com/feed/ "Canada" https://www.lapresse.ca/actualites/rss "Canada" https://nationalpost.com/feed/ "Canada" https://ottawacitizen.com/feed/ "Canada" https://theprovince.com/feed/ "Canada" https://www.thestar.com/content/thestar/feed.RSSManagerServlet.articles.topstories.rss "Canada" https://torontosun.com/category/news/feed "Canada" https://globalnews.ca/feed/ "Canada" https://alistapart.com/main/feed/ "Web Development" https://www.codewall.co.uk/feed/ "Web Development" https://css-tricks.com/feed/ "Web Development" https://davidwalsh.name/feed "Web Development" https://hacks.mozilla.org/feed/ "Web Development" https://gosink.in/rss/ "Web Development" https://developers.google.com/web/updates/rss.xml "Web Development" https://www.youtube.com/feeds/videos.xml?channel_id=UCoOae5nYA7VqaXzerajD0lg https://www.youtube.com/feeds/videos.xml?channel_id=UCvFApMFo_AafXbHRyEJefjA https://www.youtube.com/feeds/videos.xml?channel_id=UCvmINlrza7JHB1zkIOuXEbw https://www.youtube.com/feeds/videos.xml?channel_id=UCIcCXe3iWo6lq-iWKV40Oug https://www.youtube.com/feeds/videos.xml?channel_id=UCZFPiLpzd4cKOsBS9CIu3xg https://www.youtube.com/feeds/videos.xml?channel_id=UCGSGPehp0RWfca-kENgBJ9Q https://www.youtube.com/feeds/videos.xml?channel_id=UC5ZoLwtjX_7Zs8LoqpiLztQ https://www.youtube.com/feeds/videos.xml?channel_id=UCgTNupxATBfWmfehv21ym-g https://www.youtube.com/feeds/videos.xml?channel_id=UCEMe4pwYxWc0O4o7CpDYqEg https://www.youtube.com/feeds/videos.xml?channel_id=UCq297H7Ca98HlB5mVFHGSsQ https://www.youtube.com/feeds/videos.xml?channel_id=UC7QE72cxiBkiwnvGoFfqYOg https://www.youtube.com/feeds/videos.xml?channel_id=UC4xKdmAXFh4ACyhpiQ_3qBw https://www.youtube.com/feeds/videos.xml?channel_id=UC39aOXMqg48qpzEz1l_-7tQ https://www.youtube.com/feeds/videos.xml?channel_id=UCeR0n8d3ShTn_yrMhpwyE1Q

Tuesday, October 17, 2023

alias

set -o vi alias sd='sudo shutdown -h now' alias yta='yt-dlp -x --audio-format mp3' alias ytv='yt-dlp -f mp4' alias vids='yt-dlp -f mp4 -a -i --batch-file=batch.txt' alias music='yt-dlp -x --audio-format mp3 -a -i --batch- file=batch.txt'

batch.txt

https://www.youtube.com/watch?v=Gs1VDYnS-Ac https://www.youtube.com/watch?v=vt33Hp-4RXg https://www.youtube.com/watch?v=jfyt5ueyWN8&pp=ygUFeXRmemY%3D https://www.youtube.com/watch?v=sC9JH-Sr_2Q&pp=ygULdzNtIHZzIGx5bng%3D https://www.youtube.com/watch?v=b8kxdiskGzI&pp=ygULdzNtIHZzIGx5bng%3D https://www.youtube.com/watch?v=6eyFXcyosu8&pp=ygUEdmlmbQ%3D%3D https://www.youtube.com/watch?v=47QYCa8AYG4&pp=ygUEdmlmbQ%3D%3D https://www.youtube.com/watch?v=qgxsduCO1pE&pp=ygUEdmlmbQ%3D%3D https://www.youtube.com/watch?v=_xxTcKJMnWQ&pp=ygUEdmlmbQ%3D%3D

amethyst window manager

shortcut action
ctrl alt shift t toggle amethyst
alt shift t toggle float for active window
ctrl alt shift z refresh amethyst
alt shift j/k cycle active window
alt shift h/l resize windows
ctrl alt shift j/k swap active windows
ctrl alt shift # throws active window to a space

Thursday, October 12, 2023

incrementing in vim

- Ctrl A/ Ctrl Z increments  a single number up and down
- ctrl v, g ctrl a/ ctrl z does all the numbers at once

** it doesnt work on old vim 7