By Manny Fernandez

October 21, 2024

Sublime Text Customizing

This is a work in progress, I will be updating it as I use it more and figure things out.

Syncing with iCloud

Install Sublime Text 4

Run the following command from the command line of your macOS device.

cd ~/Library/Application\ Support/Sublime\ Text/Packages
mkdir -p ~/Library/Mobile\ Documents/com\~apple\~CloudDocs/WebDev/ST/Plugins
mv User ~/Library/Mobile\ Documents/com\~apple\~CloudDocs/WebDev/ST/Plugins
ln -s ~/Library/Mobile\ Documents/com\~apple\~CloudDocs/WebDev/ST/Plugins/User

These commands essentially move your configuration files to a syncable folder in iCloud Drive then sets up a symbolic link to the User folder under Sublime Text’s new folder structure and where the app is expecting the files.

cp -R ~/Library/Application\ Support/Sublime\ Text/Packages/User ~/User

     -R    If source_file designates a directory, cp copies the directory and
           the entire subtree connected at that point.  If the source_file
           ends in a /, the contents of the directory are copied rather than
           the directory itself.  This option also causes symbolic links to be
           copied, rather than indirected through, and for cp to create
           special files rather than copying them as normal files.  Created
           directories have the same mode as the corresponding source
           directory, unmodified by the process’ umask.

           In -R mode, cp will continue copying even if errors are detected.

On the other Macs you want to sync with, run these commands.  This will mirror the macOS device from the above steps

cd ~/Library/Application\ Support/Sublime\ Text/Packages
rm -rf User
ln -s ~/Library/Mobile\ Documents/com\~apple\~CloudDocs/WebDev/ST/Plugins/User

     -R    Attempt to remove the file hierarchy rooted in each file argument.  The -R option implies the -d option.  If the -i option is specified, the user is prompted for

             confirmation before each directory’s contents are processed (as well as before the attempt is made to remove the directory).  If the user does not respond

             affirmatively, the file hierarchy rooted in that directory is skipped.

     -r      Equivalent to -R.

     -f      Attempt to remove the files without prompting for confirmation, regardless of the file’s permissions.  If the file  does not exist, do not display a diagnostic message

             or modify the exit status to reflect an error.  The -f option overrides any previous -i options.

Commands

⌘ ⌥  F  (Command Option F) – Find and Replace – Ensure regex is selected on the left.  If needed, match Case

Highlight the word and ⌘ D  (Command D) continue to hit same command to manually select the matches to select all instances ⌘ ^ G (Command Control G) will select all instances without having to select one-by-one

(Command) and double-clicking word is a multi-select

Tabs

⌘ ⌥   ← or   (command option right/left arrow) use the arrows to scroll through tab’d file

⌘ ⇧ and W (command shift W) to close selected tab

⇧ ⌘ T  (command shift) to re-open a closed tab

⇧ ⌘ ⌥ 2-4 (shift command option 2-4) to open additional panels (side-by-side files)

⇧ ⌘ ⌥ 5 (shift command option 5) will Tile the panels

⌘ ⌥ 2 (command option 2) to stack panels

^ ⌘ ↑ ↓ (control command up/down arrow) to move the selected line up and down

⌘ B (Command B) to run the code inside sublime text

⌘ K (Command K) and B (holding ⌘) to open the sidebar

⌘ / (Command forward slash) will comment our the lines based on the

⌘ ⇧ P (Command Shift P) to open the common pallet

⌘ X (Command X) to delete entire line

Macros

^ Q (Control Q) to start recording macro

Search and Replace

Perform a Find All, then ^ F2 (Control F2) and each of the selection regions will get added as a bookmark.

^ ⌘ G (Control Command G)  while choosing the character you are looking for  ⌘ L (Command L) to choose the entire line, then delete

 

Recent posts

  • If you've spent any time configuring user authentication on... Full Story

  • DNS is one of those technologies that quietly underpins... Full Story

  • BGP issues on FortiGate firewalls usually trace back to... Full Story

  • Every time your laptop talks to your router, a... Full Story

  • If you've spent any time configuring NAT on a... Full Story

  • If you have spent any time configuring firewall policies... Full Story

  • High availability on FortiGate is one of those features... Full Story

  • If you've configured SD-WAN on a FortiGate, you've almost... Full Story

  • FortiLink is the management protocol that turns a FortiSwitch... Full Story

  • FortiSwitches are pretty rock solid from Mean Time Between... Full Story

  • This is a quicky tip.  Have you ever gone... Full Story

  • DNS is one of those quiet pieces of internet... Full Story

  • This article is an updated version of the previous... Full Story

  • You will add ns2 as a secondary (slave) BIND9... Full Story

  • In the process of deploying my lab, I needed... Full Story

  • RFC 8805, used to be known as Self-Correcting IP... Full Story

  • Years back, I wrote an article about certificate pinning. ... Full Story

  • FortiGates have the ability to send alerts to Microsoft... Full Story

  • In this post, I am going to walk through... Full Story

  • Troubleshooting VoIP on a FortiGate can feel like trying... Full Story

  • Prior to FortiOS 7.0, there were three commands to... Full Story

  • In this post, I am going to go over... Full Story

  • What we are going to do:  We are going... Full Story

  • Choosing between FGCP (FortiGate Clustering Protocol) and FGSP (FortiGate... Full Story

  • Creating a VLAN on macOS (The "Pro" Move) A... Full Story

  • This blog post explores the logic behind how macOS... Full Story

  • Pretty Fly for a Wi-Fi Tell My Wi-Fi Love... Full Story

  • Part of my daily gig is creating BoMs (Bill-of-Materials)... Full Story

  • ICMP introduces several security risks, but careful filtering, rate... Full Story

  • The command diag debug application dhcps -1 enables full... Full Story

  • In the world of FortiOS, execute tac report is... Full Story

  • LLDP; What is it The Link Layer Discovery Protocol... Full Story

  • What it actually does When you run diagnose fdsm... Full Story

  • Monkey Bites are bite-sized, high-impact security insights designed for... Full Story

  • I have run macOS in macOS with Parallels but... Full Story

  • Don't be confused with my other FortiNAC posts where... Full Story

  • This is the third session in a multi-part article... Full Story

  • Today I was configuring key-based authentication on a FortiGate... Full Story

  • Netcat, often called the "Swiss Army knife" of networking,... Full Story

  • At its core, IEEE 802.1X is a network layer... Full Story

  • In case you did not see the previous FortiNAC... Full Story

  • This is our 5th session where we are going... Full Story

  • Now that we have Wireshark installed and somewhat configured,... Full Story

  • The Philosophy of Packet Analysis Troubleshooting isn't about looking... Full Story

  • Overview FortiOS 8.0 introduces custom tags as a first-class... Full Story

  • These are two distinct mechanisms on FortiOS, and conflating... Full Story

  • Replacement messages are the pages and text blocks that... Full Story