My Development Environment Setup

date
Mar 20, 2024
slug
dev
status
Published
tags
Vim
Nevim
zsh
fzf
powerlevel10k
summary
customizing my development environment
type
Post
 

My Development Environment Setup

I'll share my development environment setup, focusing on my Vim/Neovim configuration and terminal setup. This setup helps me maintain a productive and efficient workflow.

Vim/Neovim Configuration

I use Vim and Neovim for editing code and files. Here's a backup of my configuration files:
  • Vim configuration file path: ~/.vimrc
  • Neovim configuration file path: ~/.config/nvim/init.vim

Plugin Manager: Vundle

I use Vundle as my plugin manager for Vim. To install Vundle, you can follow the instructions on their GitHub page.
Here's a snippet from my vimrc file to configure Vundle and add some basic plugins:
set nocompatible " be iMproved, required filetype off " required set rtp+=~/.vim/bundle/Vundle.vim call vundle#begin() Plugin 'VundleVim/Vundle.vim' " Add your plugins here " Plugin 'author/plugin_name' call vundle#end() " required filetype plugin indent on " required
With this setup, you can use commands like :PluginInstall to install plugins and :PluginList to list all configured plugins.

Terminal Setup

I've customized my terminal to enhance its functionality and appearance. Here are some of the key components of my setup:

Plugins

  • ohmyzsh: A framework for managing Zsh configuration.
  • powerlevel10k: A theme for Zsh that provides a fast and customizable prompt.
  • colorls: A Ruby script that beautifies the ls command with color and icons.
  • bat: A cat clone with syntax highlighting and Git integration.
  • fzf: A command-line fuzzy finder.

Fonts

I use nerd-fonts to ensure that icons and special characters display correctly in the terminal.

File Manager: nnn

nnn is a fast and lightweight terminal file manager. To install it, you can follow the installation instructions on their GitHub page.

Configuration

To integrate nnn and other tools into my shell, I add the following configurations to my .zshrc or .bashrc file:
export NNN_PLUG='f:finder;o:fzopen;p:mocq;d:diffs;t:nmount;v:imgview;p:preview-tui' alias nnn="nnn -e" export NNN_MISC_QUITCD="$HOME/.config/nnn/misc/quitcd" case "$SHELL" in */zsh) [ -f "$NNN_MISC_QUITCD/quitcd.bash_sh_zsh" ] && source "$NNN_MISC_QUITCD/quitcd.bash_sh_zsh" ;; */bash) [ -f "$NNN_MISC_QUITCD/quitcd.bash_sh_zsh" ] && source "$NNN_MISC_QUITCD/quitcd.bash_sh_zsh" ;; esac
For fzf, I use the following configuration to enhance its functionality:
[ -f ‾/.fzf.zsh ] && source ‾/.fzf.zsh export FZF_DEFAULT_OPTS='--height 50% --layout=reverse --border' export FZF_CTRL_T_OPTS=" --preview 'bat -n --color=always {}' --bind 'ctrl-/:change-preview-window(down|hidden|)'" export FZF_CTRL_R_OPTS=" --preview 'echo {}' --preview-window up:3:hidden:wrap --bind 'ctrl-/:toggle-preview' --bind 'ctrl-y:execute-silent(echo -n {2..} | pbcopy)+abort' --color header:italic --header 'Press CTRL-Y to copy command into clipboard'" export F ZF_ALT_C_OPTS="--preview 'tree -C {}'"
By customizing my development environment in this way, I can work more efficiently and enjoy a more pleasant coding experience.

 
記事に関する疑問があればお気軽にご連絡ください。