You can directly use this to help setup zsh
sh -c "$(wget -O- https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
or you can install the vanila setup us shown below
sudo apt install zsh
Download or run this instead: https://github.com/ohmyzsh/ohmyzsh
Make it your default shell:
chsh -s $(which zsh)
Copy the .zshrc file from this repo and paste it in ~/.zshrc.
zsh
cp copy.zshrc ~/.zshrc
source ~/.zshrc
You will have to repeat the same command to setup for other users like root
sudo -i
cd <repo directory>
cp .zshrc ~/.zshrc
source ~/.zshrc
Setup fonts (ignore for now)
git clone --depth 1 https://github.com/ryanoasis/nerd-fonts.git
cd nerd-fonts
./install.sh
Install software-properties-common:
sudo apt-get install software-properties-common
Run the following commands:
sudo add-apt-repository ppa:neovim-ppa/unstable
sudo apt-get update
sudo apt-get install neovim
To use Neovim as default editor, use the following commands:
sudo update-alternatives --install /usr/bin/vi vi /usr/bin/nvim 60
sudo update-alternatives --config vi
sudo update-alternatives --install /usr/bin/vim vim /usr/bin/nvim 60
sudo update-alternatives --config vim
sudo update-alternatives --install /usr/bin/editor editor /usr/bin/nvim 60
sudo update-alternatives --config editor
Copy the nvim folder to your ~/.config/nvim folder
mkdir ~/.config/nvim
cp -rf <repo location>/nvim_setup/nvim/* ~/.config/nvim/.
Type nvim on zsh to setup and install the plugins
nvim
Type :Lazy to check what plugins are installed on nvim
Type :Mason to check what extra plugins you can use
Inside nvim, to use ChatGpt, you need to follow the following steps
- Select the lines that you need to pass onto chatgpt
Press Esc
Move to the starting of the line
Use Shift-V and arrow keys to select the area
- Using ChatGpt
Type ':ChatGptRun optimize_code' to get started with using ChatGpt;
- Accept Changes
Press Ctrl+y to accept the recommentation
ChatGPTActAs command which opens a prompt selection from Awesome ChatGPT Prompts to be used with the gpt-3.5-turbo model.
ChatGPTEditWithInstructions command which opens interactive window to edit selected text or whole window using the code-davinci-edit-002 model (GPT 3.5 fine-tuned for coding).
ChatGPTRun [action] command which runs specific actions -- see actions.json file for a detailed list. Available actions are:
grammar_correctiontranslatekeywordsdocstringadd_testsoptimize_codesummarizefix_bugsexplain_coderoxygen_editcode_readability_analysis-- see demo
All the above actions are using gpt-3.5-turbo model.
It is possible to define custom actions with a JSON file. See actions.json for an example. The path of custom actions can be set in the config (see actions_paths field in the config example above).
When using ChatGPT and ChatGPTEditWithInstructions, the following
keybindings are available:
<C-Enter>[Both] to submit.<C-y>[Both] to copy/yank last answer.<C-o>[Both] Toggle settings window.<Tab>[Both] Cycle over windows.<C-m>[Chat] Cycle over modes (center, stick to right).<C-c>[Chat] to close chat window.<C-u>[Chat] scroll up chat window.<C-d>[Chat] scroll down chat window.<C-k>[Chat] to copy/yank code from last answer.<C-n>[Chat] Start new session.<C-d>[Chat] draft message (create message without submitting it to server)<C-r>[Chat] switch role (switch between user and assistant role to define a workflow)<C-s>[Both] Toggle system message window.<C-i>[Edit Window] use response as input.<C-d>[Edit Window] view the diff between left and right panes and use diff-mode commands
When the setting window is opened (with <C-o>), settigs can be modified by
pressing Enter on the related config. Settings are saved across sections

