在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:nicknisi/dotfiles开源软件地址:https://github.com/nicknisi/dotfiles开源编程语言:Lua 56.8%开源软件介绍:DotfilesWelcome to my world. This is a collection of vim, tmux, and zsh configurations. Interested in a video walkthrough of the dotfiles? Check out my talk, vim + tmux. Obviously this setup works for me, a JavaScript developer on macOS, but this particular setup may not work for you. If this particular setup doesn't work for you, please steal ideas from this and if you like, contribute back tips, tricks, and other tidbits via Pull Requests if you like! Initial Setup and InstallationBackupFirst, you may want to backup any existing files that exist so this doesn't overwrite your work. Run This will not delete any of these files, and the install scripts will not overwrite any existing. After the backup is complete, you can delete the files from your home directory to continue installation. InstallationIf on OSX, you will need to install the XCode CLI tools before continuing. To do so, open a terminal and type ➜ xcode-select --install Then, clone the dotfiles repository anywhere you like on your machine. ➜ git clone https://github.com/nicknisi/dotfiles.git
➜ cd dotfiles
➜ ./install.sh
Next, the install script will perform a check to see if it is running on an OSX machine. If so, it will install Homebrew if it is not currently installed and will install the homebrew packages listed in Terminal CapabilitiesIn order to properly support italic fonts in and out of tmux, a couple of terminal capabilities need to be described. Run the following from the root of the project: tic -x resources/xterm-256color-italic.terminfo
tic -x resources/tmux.terminfo ZSH SetupZSH is configured in the
PromptThe prompt is meant to be simple while still providing a lot of information to the user, particularly about the status of the git project, if the PWD is a git project. This prompt sets The prompt attempts to speed up certain information lookups by allowing for the prompt itself to be asynchronously rewritten as data comes in. This prevents the prompt from feeling sluggish when, for example, the user is in a large git repo and the git prompt commands take a considerable amount of time. It does this by writing the actual text that will be displayed int he prompt to a temp file, which is then used to update the prompt information when a signal is trapped. Git PromptThe git info shown on the
Jobs PromptThe prompt will also display a Node PromptIf a Vim and Neovim SetupNeovim is a fork and drop-in replacement for vim. in most cases, you would not notice a difference between the two, other than Neovim allows plugins to run asynchronously so that they do not freeze the editor, which is the main reason I have switched over to it. Vim and Neovim both use Vimscript and most plugins will work in both (all of the plugins I use do work in both Vim and Neovim). For this reason, they share the same configuration files in this setup. Neovim uses the XDG base directory specification which means it won't look for a
InstallationVim is likely already installed on your system. If using a Mac, MacVim will be installed from Homebrew. Neovim will also be installed from Homebrew by default on a Mac. For other systems, you may need to install Neovim manually. See their web site for more information.
Inside of vim and neovim should just work once the correct plugins are installed. To install the plugins, you will need to open Neovim in the following way: ➜ nvim +PlugInstall FontsI am currently using Operator Mono as my default font which is a paid font ($199 US) and does not include Powerline support. You do not need this font at all and there is nothing directly referencing it in the setup. For a great, free programming font, check out Mozilla's Fira. In addition to this, I do have nerd-fonts installed and configured to be used for non-ascii characters via iTerm2's profile settings. If you would prefer not to do this, then simply remove the Tmux ConfigurationTmux is a terminal multiplexor which lets you create windows and splits in the terminal that you can attach and detach from. I use it to keep multiple projects open in separate windows and to create an IDE-like environment to work in where I can have my code open in vim/neovim and a shell open to run tests/scripts. Tmux is configured in ~/.tmux.conf, and in ~/tmux/base16.sh, which defines the colors used, the layout of the tmux bar, and what what will be displayed, including the time and date, open windows, tmux session name, computer name, and current iTunes song playing. If not running on macOS, this configuration should be removed. Docker SetupA Dockerfile exists in the repository as a testing ground for linux support. To set up the image, make sure you have Docker installed and then run the following command. docker build -t dotfiles --force-rm --build-arg PRIVATE_KEY="$(cat ~/.ssh/id_rsa)" --build-arg PUBLIC_KEY="$(cat ~/.ssh/id_rsa.pub)" . This should create a docker run -it --rm dotfiles This will open a bash shell in the container which can then be used to manually test the dotfiles installation process with linux. QuestionsIf you have questions, notice issues, or would like to see improvements, please open a new discussion and I'm happy to help you out! |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论