I use both macOS and Linux, so I wanted to have a single repository for my dotfiles that would work on both systems.
On the machines I use a symlink to the dotfiles in this repository. For example, to link the .bashrc file, I would run the following command:
ln -s ~/.dotfiles/bash/.bashrc ~/.bashrc IMPORTANT: The script assumes you put the .dotfiles folder in your home directory. This is also for compatibility with different systems.
git commit -m "your message" --no-gpg-sign https://github.com/pstadler/keybase-gpg-github
Neovim, which uses Lua for configuration, looks for its configuration files in several places, one of which is the ~/.config/nvim/ directory.
By creating a symbolic link from your actual configuration files (which could be in your .dotfiles directory or elsewhere) to ~/.config/nvim/, you're telling Neovim to treat the linked files as its configuration.
ln -s path/to/your/.dotfiles/nvim .config/nvim
The nvim folder is meant to have a symlink in the .config file in the Linux home The LSP (language server protocol) for Nvim is included in the settings. I looked up some other flavours ov Vim like spacevim and onivim but they are deprecated as of today. NeoVim seems the best vim solution avalaible right now. Also check the primagen about Nvim.
https://github.com/ThePrimeagen/vim-nav-playground
https://theprimeagen.github.io/vim-fundamentals/
https://www.youtube.com/watch?v=VVdmmN0su6E
vimtutor
curl https://raw.githubusercontent.com/ThePrimeagen/vim-fundamentals/master/course-website/lessons/exercise-0-hjkl-x.md > exercise.md && vim exercise.md
https://github.com/ThePrimeagen/vim-fundamentals/blob/master/lessons/exercise-0-hjkl-x.md
zsh compinit: insecure directories, run compaudit for list. Ignore insecure directories and continue [y] or abort compinit [n]? what could it be?
This warning is related to the security of the directories used by zsh for completion. It means that some directories in your $fpath have insecure permissions. You can fix this by running compaudit to identify the insecure directories and then adjusting their permissions.
Here are the steps to resolve this issue:
- Run
compauditto identify insecure directories: compaudit - Change the permissions of the insecure directories:
For each directory listed by
compaudit, change the permissions to be more secure. Typically, you want to ensure that only the owner has write permissions. You can use thechmodcommand to do this. For example: chmod 755 /path/to/insecure/directory - Re-run
compinitto ensure the issue is resolved: compinit If you want to ignore the warning and continue without fixing the permissions, you can add the following line to your.zshrcfile before callingcompinit: zstyle ':completion:*' rehash true Here is an example of how you might modify your.zshrcfile:
zstyle ':completion:*' rehash true
autoload -Uz compinit compinit This will suppress the warning, but it is recommended to fix the permissions for better security.
also run
for dir in $(compaudit); do
sudo chmod g-w,o-w "$dir"
donecheck who is responsible for those directories again with
ls -ld $(compaudit)To check if Oh My Zsh is activated, you can:
- Look for the
.oh-my-zshdirectory:
ls -la ~/.oh-my-zsh- Check your .zshrc file for Oh My Zsh configuration:
grep "oh-my-zsh" ~/.zshrcThe "macOS" greeting comes from this line in your .zshrc:
if [[ "$OSTYPE" == "darwin"* ]]; then
# Code specific to macOS
echo "macOS"
...
fiAs for "MutantBot" - this is your computer's hostname. You can check it with:
hostnameTo change it, you can use:
sudo scutil --set HostName yournewnameIf you want to remove the "macOS" greeting, you can simply remove or comment out the echo "macOS" line in your .zshrc file.
To fully activate Oh My Zsh with a theme, make sure these lines are in your .zshrc:
export ZSH="$HOME/.oh-my-zsh"
ZSH_THEME="robbyrussell" # or any other theme you prefer
source $ZSH/oh-my-zsh.shA symlink (symbolic link) is a special type of file that points to another file or directory. Think of it as a shortcut or alias. Here's a simple explanation:
Symlink Basics: It's like a pointer or reference to another file/directory Changes to the original file are reflected in the symlink Deleting the symlink doesn't delete the original file Deleting the original file breaks the symlink Example from your dotfiles: In your setup script, you have several symlinks:
This creates a symlink from .bashrc to your dotfiles repository's .bashrc. The -s flag creates a symbolic link, and -f forces the creation even if the destination already exists. Symbolic Links (Soft Links) Created with ln -s Points to the pathname of another file Can link across different filesystems Can point to directories If the original file is deleted, the link breaks Shows up in ls -l with an l at the start and -> pointing to the target
Created with ln (without -s) Points directly to the inode (data) of the file Must be on the same filesystem Cannot link to directories Original file data remains accessible even if the original filename is deleted Appears as a regular file in ls -l