vimrc-dotfiles

授权协议 Readme
开发语言 Lua
所属分类 应用工具、 文档/文本编辑
软件类型 开源软件
地区 不详
投 递 者 晋安国
操作系统 跨平台
开源组织
适用人群 未知
 软件概览

Dotfiles

Managed via YADM and Nix (NixOS + Nix-Darwin)

Installation

Warning: If you want to give these dotfiles a try, you should first fork this repository, review the code, and remove things you don’t want or need. Don’t blindly use my settings unless you know what that entails.

Install

MacOS

Install XCode CLT (not required, but recommended)

xcode-select --install

Clone the repo

git clone --depth 1 https://github.com/shaunsingh/vimrc-dotfiles.git -f --no-bootstrap

Install nix, Launch a nix-shell with unstable, build, run

nix-shell -p nixUnstable git
nix run github:shaunsingh/vimrc-dotfiles --impure

nixOS

Note This is more of a note for myself for when I install on linux machines. I am quite new to nixos, and I recommend you check over my config before installing it. The config also uses wayland+sway, so it may be incompatible with certain gpus

Install via flakes

nix-shell -p nixUnstable git
nixos-install --flake https://github.com/shaunsingh/vimrc-dotfiles#shaunsingh-laptop

Boot, clone the dotiles

yadm clone https://github.com/shaunsingh/vimrc-dotfiles.git --no-bootstrap
yadm remote add origin https://github.com/shaunsingh/vimrc-dotfiles.git

Emacs

Personal Note: this is my configuration for emacs-ng

git clone --depth 1 https://github.com/emacs-ng/emacs-ng.git
cd emacs-ng
./autogen.sh
./configure CFLAGS="-Wl,-rpath,shared,--disable-new-dtags -g -O3 -mtune=native -march=native -fomit-frame-pointer" \
            --prefix=/usr/local/ \
            --with-json --with-modules --with-compress-install \
            --with-threads --with-included-regex --with-zlib --with-libsystemd \
            --with-rsvg --with-native-compilation --with-webrender --without-javascript \
            --without-sound --without-imagemagick --without-makeinfo --without-gpm --without-dbus \
            --without-pop --without-toolkit-scroll-bars --without-mailutils --without-gsettings \
            --with-all 
make -j$(($(nproc) * 2)) NATIVE_FULL_AOT=1
make install-strip

If you want to force recompile the literate configuration, you can run

doom sync -u

If you want to update the doom configuration, you can run

doom upgrade

If you modify your shell configuration, run doom env to regenerate env vars

Mu4e and Gmail

Email will have a few issues, since its hardcoded to my account and my machines path. Do the following steps to get email up and running for you

  1. modify ~/.mbsyncrc to include your email and password
  2. replace instances of my name and email in ~/.doom.d/config.org
  3. replace the path to msmtp in ~/.doom.d/config.org if you have an intel mac
  4. Rerun the following commands, replace the example with your email:
mu init --maildir=~/.mbsync --my-address=email@example.org
mu index
mbsync --all

Indexed mail will go under ~/.mbsync/, you can either manually mbsync or use emacs to update mail

Org Mode

My org mode config includes two additional plugins, org-agenda and org-roam.Both these plugins need a set directory. All org files can go under the created ~/org dir. Roam files go under ~/org/roam

Additional Configurations

Fonts

My configuruation uses 3 fonts not installed by default. My nix config shouldhandle installing the proportional fonts. SFMono must be installed seperately

Required:

  1. Fira SFMono Nerd Font (https://github.com/shaunsingh/SFMono-Nerd-Font-Ligaturized)

Required for emacs

  1. Overpass
  2. Alegreya

Neovim

My neovim configuration is designed for programming and quick text editing. As such, it opens in under 10ms.

Upon starting Neovim, packer should automatically install and sync. In case this step fails, or you want to update plugins, you can run :PackerSync

The plugins will install. After restarting neovim, nvim-treesitter should install and configure parsers. Afterwards. run :checkhealth to check for possible issues.

If you modify the configuration files for certain plugins, you may have to run :PackerSync to apply changes

If you want to take advantage of the LSP, you can install language servers using the following command:

:LspInstall (language) e.g. :LspInstall java to install the java LSP (jdtls)

Similarly for treesitter, do:TSInstall (language) e.g. :TSInstall java to install the java treesitter parser

I also recommend installing Neovide or goneovim if you prefer a gui experience. A goneovim config is included in the dotfiles

Feedback

Suggestions/improvementswelcome!

 相关资料
  • vimrc 是一个经过良好优化的 Vim 配置,它包含 NERD Tree、文件查找、代码补全、语法检查等多个开发必备的插件,一键安装,省去到处找各种 Vim 插件的麻烦。

  • exVim 为用户提供4种不同的 .vimrc: .vimrc, .vimrc.plugins, .vimrc.plugins.local,.vimrc.local. 首先被载入的文件是 .vimrc,我们都熟悉它。在 .vimrc 配置你的 vim 之前,它会在同一个目录检查是否存在 .vimrc.plugins 然后载入它。这是 exVim 插件的默认设置。在 .vimrc.plugins 被

  • 问题内容: 我当前的.vimrc配置如下: 但是,当我编写python脚本时,当我按“ ENTER”时,它将转到下一行的BEGINNING。我要添加些什么以便它为我自动生成标签? 问题答案: 简短的答案是您的autocmd缺少BufEnter触发器,因此在创建新文件时不会将其触发。尝试以下方法: 请注意,我还将更改为。这样可以防止这些选项踩到您其他缓冲区的选项。 执行您要执行的操作的“正确”方法是

  • 在继续学习Vimscript之前,我们先找个添加新映射到~/.vimrc文件中的更方便的方法。 有时你正在疯狂的编码,突然发现加个映射会加速你的进度。你要立即将其加到~/.vimrc 文件中以防止忘记,但是你 不想 退出当前的文件,因为灵感稍纵即逝。 本章的主题是你想使编辑文件更为方便变得更为方便。 有点绕,但我没有拼错。再读一次。 本章的主题是你想使(((编辑文件)更为方便)变得更为方便)。 编

  • 使用 Vim 的首先肯定要安装 Vim。这节课我们就来学习下如何在自己的电脑上安装 Vim 编辑器。课程中使用的操作系统是 CentOS 8.0 的 Linux 发行版本,Vim 的版本选择的是 8.0 版本,同学们也可以自行选用其他 Linux 的发行版本。 Vim 在大多数的 Linux 发型版本中都是默认安装好的,无需再手动进行安装。同学们可以先查看一下自己的发行版上有没有安装 Vim: 查

  • 为了回答超级用户的这个问题,我写了一个小的vimscript,它将检测符号链接的文件类型并改变语法高亮显示: au BufNewFile,BufRead * if 因此,如果我打开一个没有扩展名的符号链接,它将查看它指向的文件的扩展名。 它起作用了,但一个意想不到的后果是现在我的文件的语法高亮显示消失了。默认情况下,我的. vimrc文件具有vim语法高亮显示(

相关阅读

相关文章

相关问答

相关文档