Load local packages
To load an Emacs package locally, you’ll need to do a few things. Here’s a step-by-step guide:
Install the package manually: First, you’ll need to have the package files somewhere on your system. You may download it from a source or create it yourself. Let’s say you have a package named
mypackagein a directory at
Add the package directory to your load path: Emacs uses a variable called
load-pathto determine where to look for packages to load. You can add your package’s directory to this path by adding the following line to your Emacs configuration file (
(add-to-list 'load-path "~/emacs/mypackage")
Note that Emacs does not expand the
~ character in paths, so you’ll need to use the full path to your package directory or use the
expand-file-name function to expand the path.
- Require the package: Once the directory is in your load path, you can require the package in your Emacs configuration file:
This tells Emacs to load the
mypackage package when it starts up.
Note: The package’s main file should be named
mypackage.el, and there should be a
(provide 'mypackage) expression at the end of this file for the
require function to work.
This approach is for simple, single-file packages. More complex packages that have a structure and come with an
-autoloads.el file will require a different approach. You might need to use the built-in package manager (
package.el) or a third-party package manager like
use-package to handle autoloading and dependencies properly.
Ordering JSON by key value
[^spacemacslayer] If using
spacemacs, it requires the
Creating a projectile project
To create a
projectile project either use a valid Git repository or create the special
.projectile file in root.
Do a SPC p f, but make sure the projectile project is created.
The standard Emacs keys are valid here (even for Spacemacs).
- SPC w h
Indent a block of text
Select the block with
V and then press Ctrl-x TAB. Then use
l to move it along