我为我的网络文件找到了。但我不明白作者为什么要做dotfiles_old。相反,你只需移动到dotfiles。
有什么好的理由这么做吗?如果是的话,为什么?
没有dofiles_old我能做吗?是个好主意吗?
代码:
#!/bin/bash
############################
# .make.sh
# This script creates symlinks from the home directory to any desired dotfiles in ~/dotfiles
############################
########
我使用git在多台机器上跟踪我的点文件。我在回购中写了一个非常简单的脚本,它备份了所有过时的现有的dotfile,然后创建到每个最新的dotfile的符号链接。下面是脚本:
#!/bin/bash
############################
# makesymlinks.sh
# This script creates symlinks from the home directory to any desired dotfiles in ~/dotfiles
############################
########## Variables
dir=~/dot
我有以下几点:
if [ $kernel == 'Darwin' ]; then
$HOME="/Users/$user"
elif [ $kernel == 'Linux' ]; then
$HOME="/home/$user"
fi
# Let the script know what the dotfiles dir is
dotfiles_dir="$HOME/dotfiles"
# Making symlinks to shell files, add yours as you nee
我有下面的zsh脚本,它将给定目录中的所有文件(README.md除外)符号链接到我的主目录,在每个文件名前面有一个前导的.。
setopt EXTENDED_GLOB
for rcfile in "${ZDOTDIR:-$HOME}"/.dotfiles/home/^README.md(.N); do
ln -fsv "$rcfile" "${ZDOTDIR:-$HOME}/.${rcfile:t}"
done
问题是,glob似乎不包括"${ZDOTDIR:-$HOME}"/.dotfiles/home/中的任何目录,只是
如果有人能给我指明正确的方向,我将不胜感激。我试图在$HOME/dotfiles目录中为每个用户列表找到一个目录列表,然后从该列表中在$HOME中创建该目录的一个符号链接。
# Get list of directories in $HOME/dotfiles
- name: Get list of directories in $HOME/dotfiles
find:
paths: "/home/{{ user.username }}/dotfiles"
file_type: directory
recurse: false
register:
不久前,我用zsh脚本编写了这个循环,现在我不记得它是做什么的了,我需要将这个脚本转换为在sh中运行。 for f in ${HOME}/.dotfiles/files/*(N) ${HOME}/.dotfiles/files/.*(N); do
symlink_prompt $(basename $f)
done 有人能帮我理解一下这是做什么的吗,以及如何在sh语法中复制它?
我的.vimrc文件位于自定义位置(~/dotfiles/vim/..vimrc)。当我键入i:
vim 'filename'
我想执行以下命令:
vim -u ~/dotfiles/vim/.vimrc 'filename'
我把这个函数放在我的.bashrc中:
function vim() {
vim -u ~/dotfiles/vim/.vimrc $1
}
但是,我没有看到.vimrc的变化,很确定标准的vim已经打开了。
初步产出:
ravi@boxy ~/.dotfiles/.vim/bundle $ git status
On branch master
Your branch is up-to-date with 'origin/master'.
nothing to commit, working directory clean
ravi@boxy ~/.dotfiles/.vim/bundle $
现在,cd并再次运行git状态:
ravi@boxy ~/.dotfiles/.vim/bundle $ cd neobundle.vim/
ravi@boxy ~/.dotfiles/.v
在以一堆不同的方式添加文件后,无论我尝试以哪种方式添加文件,这些文件仍然不会添加到提交中。这是我的控制台输出,因此您可以更好地理解:
daniel@padamtuts:~/github/dotfiles$ git status
On branch master
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard cha
在我的dotfiles配置中,我试图构建它,以便能够自动加载某个文件夹中的*.vim文件。为此,我将以下代码添加到我的.vimrc文件中:
function PluginConfigs ()
let vimscripts = split(globpath("$ZSH/vim", '*.vim'), '\n')
for i in vimscripts
echom i
source i
endfor
endfunction
call PluginConfigs()
当我现在打开Vim时,我得到了
我为Neovim (https://github.com/stevearc/gkeep.nvim)安装了gkeep插件,但我不喜欢它。我从我的插件中删除了它(我使用vim-plug),然后运行:PlugClean。但现在我每次打开neovim都会在提到gkeep插件时出错。如何解决这个问题? Error detected while processing function remote#define#request:
line 2:
Error invoking '/home/daniil/dotfiles/nvim/plugged/gkeep.nvim/rplugin/pyt