From 4e131dcc5c2957409a1b402f032f0ea869590856 Mon Sep 17 00:00:00 2001 From: Roberamelaek Date: Sat, 17 Jun 2023 13:43:42 -0400 Subject: [PATCH 01/14] the readme file --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 2dbb653..97848a3 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,6 @@ To install and use the Vim configuration provided in this repository, follow the ```bash cd .dotfiles 4. Run the configuration script to install the Vim settings: - ```bash sh config.sh From ffb9011e110569a4105d7bf73223f6d81b6ac45a Mon Sep 17 00:00:00 2001 From: Roberamelaek Date: Thu, 6 Jul 2023 21:28:14 -0400 Subject: [PATCH 02/14] costomizing tmux and the config.sh file --- config.sh | 34 ++++++---------------------------- tmuxrc | 5 +++++ vimrc | 1 + 3 files changed, 12 insertions(+), 28 deletions(-) create mode 100644 tmuxrc diff --git a/config.sh b/config.sh index 54350e9..d25fc12 100755 --- a/config.sh +++ b/config.sh @@ -1,36 +1,14 @@ vimrc_path="$HOME/.dotfiles/vimrc" home_path="$HOME/.vimrc" -if [ -f "$home_path" ]; then - echo ".vimrc file already exsists aborting" -else - ln -s "$vimrc_path" "$home_path" - echo "The symboilc linking do sucssusfully" -fi +tmuxrc_path="$HOME/.dotfiles/tmuxrc" +tmux_path="$HOME/.tmux.conf" -if grep -Fxq "source ~/.dotfiles/.alias" ~/.bashrc; then +[ -f "$home_path" ] && echo ".vimrc file already exists. Aborting." || ln -s "$vimrc_path" "$home_path" && echo "Symbolic linking successful." - echo "Checking if the connection of the file..." - echo "The file is already linked!." - -else - echo "Linking .alias to .bashrc" - echo "source ~/.dotfiles/.alias">> ~/.bashrc - echo "Linked sucssusfully" - -fi - -if grep -Fxq "source ~/.dotfiles/.prompt" ~/.bashrc; then - - echo "checking if the connection of the file..." - echo "The file is already linked!." - -else - echo "Linking .prompt to .bashrc..." - echo "source ~/.dotfiles/.prompt">> ~/.bashrc - echo "Linked sucssusfully" - -fi +[ -f "$tmux_path" ] && echo ".tmux.conf file already exists. Aborting." || ln -s "$tmuxrc_path" "$tmux_path" && echo "symbolic linking successful." +grep -q "source ~/.dotfiles/.alias" ~/.bashrc && echo "The file is already linked." || echo "source ~/.dotfiles/.alias" >> ~/.bashrc && echo "Linked successfully." +grep -q "source ~/.dotfiles/.prompt" ~/.bashrc && echo "The file is already linked." || echo "source ~/.dotfiles/.prompt" >> ~/.bashrc && echo "Linked successfully." diff --git a/tmuxrc b/tmuxrc new file mode 100644 index 0000000..dbac131 --- /dev/null +++ b/tmuxrc @@ -0,0 +1,5 @@ +# Remap prefix key +unbind-key C-b +set-option -g prefix C-a +bind-key C-a send-prefix + diff --git a/vimrc b/vimrc index b7f86ce..d54d1e7 100644 --- a/vimrc +++ b/vimrc @@ -4,3 +4,4 @@ set tabstop=4 set shiftwidth=4 syntax on set mouse=a +set relativenumber From d78a5d535e22099d411b430007e32633b6a3f558 Mon Sep 17 00:00:00 2001 From: Roberamelaek Date: Thu, 6 Jul 2023 22:17:48 -0400 Subject: [PATCH 03/14] config the .prompt file to change color --- .prompt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.prompt b/.prompt index 30d8d1b..4d3bf01 100644 --- a/.prompt +++ b/.prompt @@ -17,7 +17,7 @@ function set_PS1 { # - host machine (\h) # See also: `man bash` PS1='\[\e[1;33m\]\D{%b-%d %H:%M:%S}\[\e[0m\] \[\e[1;35m\]\w\[\e[0m\]$(parse_git_branch) -\[\e[1;36m\][\u.\h]\[\e[0m\]$Ps1Tail> ' +\[\e[1;32m\][\u.\h]\[\e[0m\]$Ps1Tail> ' } set_PS1 # Call the set_PS1 function From 3e2a942ae04d2ab399b5ed8b16c170fa5cef7727 Mon Sep 17 00:00:00 2001 From: Roberamelaek Date: Fri, 7 Jul 2023 19:09:07 -0400 Subject: [PATCH 04/14] #fix 11 #fix11 --- config.sh | 14 ++++++++++++-- gitconfig | 11 +++++++++++ nbrc | 21 +++++++++++++++++++++ 3 files changed, 44 insertions(+), 2 deletions(-) create mode 100644 gitconfig create mode 100644 nbrc diff --git a/config.sh b/config.sh index d25fc12..6af8885 100755 --- a/config.sh +++ b/config.sh @@ -1,12 +1,22 @@ vimrc_path="$HOME/.dotfiles/vimrc" home_path="$HOME/.vimrc" +gitrc_path="$HOME/.dotfiles/gitconfig" +git_path="$HOME/.gitconfig" + tmuxrc_path="$HOME/.dotfiles/tmuxrc" tmux_path="$HOME/.tmux.conf" -[ -f "$home_path" ] && echo ".vimrc file already exists. Aborting." || ln -s "$vimrc_path" "$home_path" && echo "Symbolic linking successful." +nbrc_path="$HOME/.dotfiles/nbrc" +nb_path="$HOME/.nbrc" + +[ -f "$home_path" ] && echo ".vimrc file already exists. Aborting." || ln -s "$vimrc_path" $home_path && echo "Symbolic linking successful." + +[ -f "$nb_path" ] && echo ".nbrc file is already present." || ln -s "$nbrc_path" $nb_path && echo "nb is successfully customized." + +[ -f "$tmux_path" ] && echo ".tmux.conf file already exists. Aborting." || ln -s "$tmuxrc_path" $tmux_path && echo "Symbolic linking successful." -[ -f "$tmux_path" ] && echo ".tmux.conf file already exists. Aborting." || ln -s "$tmuxrc_path" "$tmux_path" && echo "symbolic linking successful." +[ -f "$git_path" ] && echo ".git.config file already exists. Aborting." || ln -s "$gitrc_path" $git_path && echo ".git is successfully installed" grep -q "source ~/.dotfiles/.alias" ~/.bashrc && echo "The file is already linked." || echo "source ~/.dotfiles/.alias" >> ~/.bashrc && echo "Linked successfully." diff --git a/gitconfig b/gitconfig new file mode 100644 index 0000000..29a9749 --- /dev/null +++ b/gitconfig @@ -0,0 +1,11 @@ +[user] + email = Robaman2231999@gmail.com\n + password = Robaman464546 + name = Roberamelaek + +[color] + ui = auto +[init] + defaultBranch = main +[alias] + co = commit diff --git a/nbrc b/nbrc new file mode 100644 index 0000000..315a8a8 --- /dev/null +++ b/nbrc @@ -0,0 +1,21 @@ +#!/usr/bin/env bash +export NB_INDICATOR_PINNED="💖" +############################################################################### +# .nbrc +# +# Configuration file for `nb`, a command line note-taking, bookmarking, +# and knowledge base application with encryption, search, Git-backed syncing, +# and more in a single portable script. +# +# Edit this file manually or manage settings using the `nb settings` +# subcommand. Configuration options are set as environment variables, eg: +# export NB_ENCRYPTION_TOOL=gpg +# +# https://github.com/xwmx/nb +############################################################################### +export NB_ACE_ENABLED=1 +export EDITOR="vim" # Set by `nb` • Tue Jul 4 08:19:36 PM EDT 2023 + +export NB_COLOR_THEME="${NB_COLOR_THEME:-forest}" # Set by `nb` • Thu Jul 6 10:00:16 PM EDT 2023 +export NB_INDICATOR_EBOOK="📖" +export NB_INDICATOR_NOTEBOOK="📖" From aae68d55bd04a8b55d6f1c3b84f9fad6dec6c1c5 Mon Sep 17 00:00:00 2001 From: Roberamelaek Date: Fri, 7 Jul 2023 19:41:48 -0400 Subject: [PATCH 05/14] Fixes #11 --- config.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/config.sh b/config.sh index 6af8885..7c31d3b 100755 --- a/config.sh +++ b/config.sh @@ -1,6 +1,8 @@ vimrc_path="$HOME/.dotfiles/vimrc" home_path="$HOME/.vimrc" +#the gitrc file + gitrc_path="$HOME/.dotfiles/gitconfig" git_path="$HOME/.gitconfig" From 9a117a922dfdf5107b9ce05aa77a869257d530c2 Mon Sep 17 00:00:00 2001 From: Roberamelaek Date: Mon, 10 Jul 2023 15:45:25 -0400 Subject: [PATCH 06/14] MAKE GIT CONFIG .SH AND INSTALL.SH --- .nbrc | 1 + gitconfig | 11 ------- gitconfig/gitinstall.sh | 11 +++++++ install.sh | 68 +++++++++++++++++++++++++++++++++++++++++ 4 files changed, 80 insertions(+), 11 deletions(-) create mode 120000 .nbrc delete mode 100644 gitconfig create mode 100644 gitconfig/gitinstall.sh create mode 100755 install.sh diff --git a/.nbrc b/.nbrc new file mode 120000 index 0000000..f4cb624 --- /dev/null +++ b/.nbrc @@ -0,0 +1 @@ +~/.dotfiles/nbrc \ No newline at end of file diff --git a/gitconfig b/gitconfig deleted file mode 100644 index 29a9749..0000000 --- a/gitconfig +++ /dev/null @@ -1,11 +0,0 @@ -[user] - email = Robaman2231999@gmail.com\n - password = Robaman464546 - name = Roberamelaek - -[color] - ui = auto -[init] - defaultBranch = main -[alias] - co = commit diff --git a/gitconfig/gitinstall.sh b/gitconfig/gitinstall.sh new file mode 100644 index 0000000..3f30151 --- /dev/null +++ b/gitconfig/gitinstall.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +# Set up global alias shortcuts for Git configurations +git config --global alias.co checkout +git config --global alias.br branch +git config --global alias.ci commit +git config --global alias.st status +git config --global alias.hist 'log --oneline --decorate --graph' + +echo "Global Git alias shortcuts have been added!" + diff --git a/install.sh b/install.sh new file mode 100755 index 0000000..604f7f8 --- /dev/null +++ b/install.sh @@ -0,0 +1,68 @@ + +#n to check if a package is installed +package_installed() { + package="$1" + dpkg -s "$package" >/dev/null 2>&1 +} + +# Check if Vim is installed +if ! package_installed "vim"; then + echo "Installing Vim..." + apt-get update + apt-get install -y vim +else + echo "Vim is already installed." +fi + +# Check if Tmux is installed +if ! package_installed "tmux"; then + echo "Installing Tmux..." + apt-get update + apt-get install -y tmux +else + echo "Tmux is already installed." +fi + +# Check if Git is installed +if ! package_installed "git"; then + echo "Installing Git..." + apt-get update + apt-get install -y git +else + echo "Git is already installed." +fi + +# Set the paths for your configuration files +nbrc_path="$HOME/.dotfiles/nbrc" +tmuxrc_path="$HOME/.dotfiles/tmuxrc" +vimrc_path="$HOME/.dotfiles/vimrc" +gitconfig_path="$HOME/.dotfiles/gitconfig" +gitinstall_path="$HOME/.dotfiles/gitconfig/gitinstall.sh" + +# Set the destination directories for the symbolic links +nbrc_dest="$HOME/.nbrc" +tmuxrc_dest="$HOME/.tmux.conf" +vimrc_dest="$HOME/vimrc" + +# Function to create or recreate symbolic links +create_symlink() { + source_file="$1" + dest_file="$2" + + if [[ -e "$dest_file" || -L "$dest_file" ]]; then + rm "$dest_file" + echo "Deleted existing file or symbolic link: $dest_file" + fi + + ln -s "$source_file" "$dest_file" + echo "Created symbolic link: $dest_file" +} + +# Create or recreate symbolic links for the configuration files +create_symlink "$nbrc_path" "$nbrc_dest" +create_symlink "$tmuxrc_path" "$tmuxrc_dest" +create_symlink "$vimrc_path" "$vimrc_dest" + +# Run the gitinstall.sh script +bash "$gitinstall_path" + From 31be9cc051bab3711d8c75d440f14d70c8a18068 Mon Sep 17 00:00:00 2001 From: Roberamelaek Date: Tue, 11 Jul 2023 11:39:22 -0400 Subject: [PATCH 07/14] deleting the config.sh file --- config.sh | 26 -------------------------- 1 file changed, 26 deletions(-) delete mode 100755 config.sh diff --git a/config.sh b/config.sh deleted file mode 100755 index 7c31d3b..0000000 --- a/config.sh +++ /dev/null @@ -1,26 +0,0 @@ -vimrc_path="$HOME/.dotfiles/vimrc" -home_path="$HOME/.vimrc" - -#the gitrc file - -gitrc_path="$HOME/.dotfiles/gitconfig" -git_path="$HOME/.gitconfig" - -tmuxrc_path="$HOME/.dotfiles/tmuxrc" -tmux_path="$HOME/.tmux.conf" - -nbrc_path="$HOME/.dotfiles/nbrc" -nb_path="$HOME/.nbrc" - -[ -f "$home_path" ] && echo ".vimrc file already exists. Aborting." || ln -s "$vimrc_path" $home_path && echo "Symbolic linking successful." - -[ -f "$nb_path" ] && echo ".nbrc file is already present." || ln -s "$nbrc_path" $nb_path && echo "nb is successfully customized." - -[ -f "$tmux_path" ] && echo ".tmux.conf file already exists. Aborting." || ln -s "$tmuxrc_path" $tmux_path && echo "Symbolic linking successful." - -[ -f "$git_path" ] && echo ".git.config file already exists. Aborting." || ln -s "$gitrc_path" $git_path && echo ".git is successfully installed" - -grep -q "source ~/.dotfiles/.alias" ~/.bashrc && echo "The file is already linked." || echo "source ~/.dotfiles/.alias" >> ~/.bashrc && echo "Linked successfully." - -grep -q "source ~/.dotfiles/.prompt" ~/.bashrc && echo "The file is already linked." || echo "source ~/.dotfiles/.prompt" >> ~/.bashrc && echo "Linked successfully." - From eaff4a75fc9a5b8c726758ad95fc35d954f6a034 Mon Sep 17 00:00:00 2001 From: Roberamelaek Date: Wed, 12 Jul 2023 00:31:24 -0400 Subject: [PATCH 08/14] DIY --- .tmuxrc.swp | Bin 0 -> 12288 bytes install.sh | 48 ++++++++++++++++++------------------------------ 2 files changed, 18 insertions(+), 30 deletions(-) create mode 100644 .tmuxrc.swp diff --git a/.tmuxrc.swp b/.tmuxrc.swp new file mode 100644 index 0000000000000000000000000000000000000000..7a9400ff80added7fa682cb6d322c5b7047c92b9 GIT binary patch literal 12288 zcmeI%K}y3w6oBDZ!KEmAfl=4f*19RUQdcf2qSSrTOeEB1LNb90qIVFygxG6%4R0Xy z22Mx{BGgq~6#fT~;my2x4Bsv!?A~4sRKML5A3Gvfud`@=b15$;BDoDs9#jW^N8P6f z!RXA|@oADTX@9C4JMGB2IJq}P$4$y@Bxdgrcs^B*+#Gev*6xuQ@?f literal 0 HcmV?d00001 diff --git a/install.sh b/install.sh index 604f7f8..891584c 100755 --- a/install.sh +++ b/install.sh @@ -1,36 +1,24 @@ +#!/bin/bash +set -e -#n to check if a package is installed +# Check if a package is installed package_installed() { package="$1" - dpkg -s "$package" >/dev/null 2>&1 + command -v "$package" >/dev/null 2>&1 } -# Check if Vim is installed -if ! package_installed "vim"; then - echo "Installing Vim..." - apt-get update - apt-get install -y vim -else - echo "Vim is already installed." -fi +# List of packages to check and install +packages=("vim" "tmux" "git") -# Check if Tmux is installed -if ! package_installed "tmux"; then - echo "Installing Tmux..." - apt-get update - apt-get install -y tmux -else - echo "Tmux is already installed." -fi - -# Check if Git is installed -if ! package_installed "git"; then - echo "Installing Git..." - apt-get update - apt-get install -y git -else - echo "Git is already installed." -fi +for package in "${packages[@]}"; do + if ! package_installed "$package"; then + echo "Installing $package..." + apt-get update + apt-get install -y "$package" + else + echo "$package is already installed." + fi +done # Set the paths for your configuration files nbrc_path="$HOME/.dotfiles/nbrc" @@ -42,12 +30,12 @@ gitinstall_path="$HOME/.dotfiles/gitconfig/gitinstall.sh" # Set the destination directories for the symbolic links nbrc_dest="$HOME/.nbrc" tmuxrc_dest="$HOME/.tmux.conf" -vimrc_dest="$HOME/vimrc" +vimrc_dest="$HOME/.vimrc" # Function to create or recreate symbolic links create_symlink() { - source_file="$1" - dest_file="$2" + local source_file="$1" + local dest_file="$2" if [[ -e "$dest_file" || -L "$dest_file" ]]; then rm "$dest_file" From d9288d6cc8060cfc15f1df27e981387ca8096498 Mon Sep 17 00:00:00 2001 From: RoberaMelaek Date: Thu, 13 Jul 2023 23:38:42 -0400 Subject: [PATCH 09/14] resetting the last commit and deleting the bin files --- .nbrc | 1 - .tmuxrc.swp | Bin 12288 -> 0 bytes install.sh | 11 +++++++++++ 3 files changed, 11 insertions(+), 1 deletion(-) delete mode 120000 .nbrc delete mode 100644 .tmuxrc.swp diff --git a/.nbrc b/.nbrc deleted file mode 120000 index f4cb624..0000000 --- a/.nbrc +++ /dev/null @@ -1 +0,0 @@ -~/.dotfiles/nbrc \ No newline at end of file diff --git a/.tmuxrc.swp b/.tmuxrc.swp deleted file mode 100644 index 7a9400ff80added7fa682cb6d322c5b7047c92b9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 12288 zcmeI%K}y3w6oBDZ!KEmAfl=4f*19RUQdcf2qSSrTOeEB1LNb90qIVFygxG6%4R0Xy z22Mx{BGgq~6#fT~;my2x4Bsv!?A~4sRKML5A3Gvfud`@=b15$;BDoDs9#jW^N8P6f z!RXA|@oADTX@9C4JMGB2IJq}P$4$y@Bxdgrcs^B*+#Gev*6xuQ@?f diff --git a/install.sh b/install.sh index 891584c..76d696c 100755 --- a/install.sh +++ b/install.sh @@ -54,3 +54,14 @@ create_symlink "$vimrc_path" "$vimrc_dest" # Run the gitinstall.sh script bash "$gitinstall_path" +# Array of file names to source +files=("prompt" "alias") + +# Add source commands to .bashrc for each file +for file in "${files[@]}"; do + filepath="$HOME/.dotfiles/.$file" + if [[ -f "$filepath" ]]; then + echo "source $filepath" >> "$HOME/.bashrc" + fi +done + From 5cd7b5de40d1ccdf66b0a7fbee97b29a591d6b72 Mon Sep 17 00:00:00 2001 From: RoberaMelaek Date: Thu, 13 Jul 2023 23:48:05 -0400 Subject: [PATCH 10/14] updating the read me file to suit the recent commits --- README.md | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 97848a3..df40a31 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -# Vim run commands installer +# Dotfiles: Configuration Files for Vim, Tmux, and Git -This repository is my personal vimrc file and also comes with an .sh installer. Feel free to configure and personalize the file to suit your preference. +This repository is my personal Configurations file and also comes with an .sh installer. Feel free to configure and personalize the file to suit your preference. This is the basic sample that you can copy and use. Tips to improve and make it more personalized will be appreciated. @@ -9,11 +9,13 @@ Instructions on how to install, use, and personalize will be provided below. ## Contents 1. vimrc -2. config.sh +2. Tmuxrc +3. gitconfig.sh +4. install.sh ### Installation -To install and use the Vim configuration provided in this repository, follow these steps: +To install and use the configuration provided in this repository, follow these steps: 1. Clone the repository to your local machine using the following command: @@ -23,7 +25,7 @@ To install and use the Vim configuration provided in this repository, follow the 2. Rename the dotfile to .dotfile: ```bash - mv dotfiles .dotfiles + mv dotfile .dotfiles 3. Change into the repository directory: @@ -31,9 +33,9 @@ To install and use the Vim configuration provided in this repository, follow the cd .dotfiles 4. Run the configuration script to install the Vim settings: ```bash - sh config.sh + sh install.sh -- The `vimrc` file will be copied to your home directory (`~/`) and Vim will be configured accordingly. +- The files will be copied to your home directory (`~/`) and Vim will be configured accordingly. - Now you're all set to use the customized Vim configuration! -- Feel free to customize the vimrc file before you run sh config.sh have fun with the project and leave feadback for more if you have any questions or helpful and fun ideas!! +- Feel free to customize the files before you run sh install.sh have fun with the project and leave feadback for more if you have any questions or helpful and fun ideas!! From 24215691f96c9774604b38c807a53db475b9dbea Mon Sep 17 00:00:00 2001 From: Roberamelaek Date: Sun, 10 Dec 2023 02:18:23 -0500 Subject: [PATCH 11/14] this is the left over change --- .alias | 2 + .config/nvim/init.vim | 98 +++++++++++++++++++++++++++++++++++++++++ .prompt | 2 +- gitconfig/gitinstall.sh | 1 + install_init_vim.sh | 19 ++++++++ nbrc | 7 ++- tmuxrc | 10 +++++ 7 files changed, 137 insertions(+), 2 deletions(-) create mode 100644 .config/nvim/init.vim mode change 100644 => 100755 gitconfig/gitinstall.sh create mode 100644 install_init_vim.sh diff --git a/.alias b/.alias index 9b14a49..01325d7 100644 --- a/.alias +++ b/.alias @@ -1,2 +1,4 @@ alias g="git" +alias nv="nvim" alias v="vim" +alias dc="docker-compose" diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim new file mode 100644 index 0000000..fbefda0 --- /dev/null +++ b/.config/nvim/init.vim @@ -0,0 +1,98 @@ +:set number +:set relativenumber +:set autoindent +:set tabstop=4 +:set shiftwidth=4 +:set smarttab +:set softtabstop=4 +:set mouse=a + +call plug#begin() + +Plug 'http://github.com/tpope/vim-surround' " Surrounding ysw) +Plug 'https://github.com/preservim/nerdtree' " NerdTree +Plug 'https://github.com/tpope/vim-commentary' " For Commenting gcc & gc +Plug 'https://github.com/vim-airline/vim-airline' " Status bar +Plug 'https://github.com/lifepillar/pgsql.vim' " PSQL Pluging needs :SQLSetType pgsql.vim +Plug 'https://github.com/ap/vim-css-color' " CSS Color Preview +Plug 'https://github.com/rafi/awesome-vim-colorschemes' " Retro Scheme +Plug 'https://github.com/neoclide/coc.nvim' " Auto Completion +Plug 'https://github.com/ryanoasis/vim-devicons' " Developer Icons +Plug 'https://github.com/tc50cal/vim-terminal' " Vim Terminal +Plug 'https://github.com/preservim/tagbar' " Tagbar for code navigation +Plug 'https://github.com/terryma/vim-multiple-cursors' " CTRL + N for multiple cursors + +set encoding=UTF-8 + +call plug#end() + +nnoremap :NERDTreeFocus +nnoremap :NERDTree +nnoremap :NERDTreeToggle +nnoremap :call CocActionAsync('jumpDefinition') + +nmap :TagbarToggle + +:set completeopt-=preview " For No Previews + +:colorscheme jellybeans + +let g:NERDTreeDirArrowExpandable="+" +let g:NERDTreeDirArrowCollapsible="~" + +" --- Just Some Notes --- +" :PlugClean :PlugInstall :UpdateRemotePlugins +" +" :CocInstall coc-python +" :CocInstall coc-clangd +" :CocInstall coc-snippets +" :CocCommand snippets.edit... FOR EACH FILE TYPE + +" air-line +let g:airline_powerline_fonts = 1 + +if !exists('g:airline_symbols') + let g:airline_symbols = {} +endif + +" airline symbols +let g:airline_left_sep = '' +let g:airline_left_alt_sep = '' +let g:airline_right_sep = '' +let g:airline_right_alt_sep = '' +let g:airline_symbols.branch = '' +let g:airline_symbols.readonly = '' +let g:airline_symbols.linenr = '' + +inoremap pumvisible() ? coc#_select_confirm() : "" + +" Enable folding based on Markdown headings + +autocmd FileType markdown setlocal foldmethod=marker +autocmd FileType markdown setlocal foldmarker=##,## + +command! InsertDate execute 'normal! O=strftime("## %A, %Y-%M-%d")' + +nnoremap :InsertDate + +set foldmethod=manual + +syntax enable + + +" Custom fold expression for Markdown +function! MarkdownFoldExpr() + " Get the current line + let thisline = getline(v:lnum) + " Get the next line + let nextline = getline(v:lnum + 1) + " Check if the next line contains '##' to determine fold level + if nextline =~ '^##' + return '>1' + else + return '=' + endif +endfunction + +" Set foldmethod to 'expr' and foldexpr to the custom function for Markdown files +autocmd FileType markdown setlocal foldmethod=expr foldexpr=MarkdownFoldExpr() diff --git a/.prompt b/.prompt index 4d3bf01..4d79368 100644 --- a/.prompt +++ b/.prompt @@ -1,5 +1,5 @@ ## Prompt - +set -o vi function parse_git_branch(){ # Parse the current git branch name and print it which git &>/dev/null || return diff --git a/gitconfig/gitinstall.sh b/gitconfig/gitinstall.sh old mode 100644 new mode 100755 index 3f30151..bcf6e60 --- a/gitconfig/gitinstall.sh +++ b/gitconfig/gitinstall.sh @@ -3,6 +3,7 @@ # Set up global alias shortcuts for Git configurations git config --global alias.co checkout git config --global alias.br branch +git config --global alias.d diff git config --global alias.ci commit git config --global alias.st status git config --global alias.hist 'log --oneline --decorate --graph' diff --git a/install_init_vim.sh b/install_init_vim.sh new file mode 100644 index 0000000..0467a8d --- /dev/null +++ b/install_init_vim.sh @@ -0,0 +1,19 @@ + + +SOURCE="$HOME/.dotfiles/.config/nvim/init.vim" +DESTINATION="$HOME/.config/nvim/init.vim" + +if [ -f "$SOURCE" ]; then + + if [ -f "$DESTINATION" ]; then + + rm "$DESTINATION" + + echo "Existing init.vim deleted." + + fi + + cp "$SOURCE" "$DESTINATION" + echo "init.vim copied successfully." +else + echo "SOURCE init.vim file not found in ~ diff --git a/nbrc b/nbrc index 315a8a8..64f8e12 100644 --- a/nbrc +++ b/nbrc @@ -14,8 +14,13 @@ export NB_INDICATOR_PINNED="💖" # https://github.com/xwmx/nb ############################################################################### export NB_ACE_ENABLED=1 -export EDITOR="vim" # Set by `nb` • Tue Jul 4 08:19:36 PM EDT 2023 +export EDITOR="nvim" # Set by `nb` • Tue Jul 4 08:19:36 PM EDT 2023 + +NB_IMAGE_TOOL=imgcat export NB_COLOR_THEME="${NB_COLOR_THEME:-forest}" # Set by `nb` • Thu Jul 6 10:00:16 PM EDT 2023 export NB_INDICATOR_EBOOK="📖" export NB_INDICATOR_NOTEBOOK="📖" + +NB_MARKDOWN_TOOL=glow + diff --git a/tmuxrc b/tmuxrc index dbac131..c6b62c4 100644 --- a/tmuxrc +++ b/tmuxrc @@ -2,4 +2,14 @@ unbind-key C-b set-option -g prefix C-a bind-key C-a send-prefix +bind | split-window -h -c "#{pane_current_path}" +bind - split-window -v -c "#{pane_current_path}" +# Use hjkl for window navigation +setw -g mode-keys vi +# Enable vim-like pane navigation using hjkl +bind h select-pane -L +bind j select-pane -D +bind k select-pane -U +bind l select-pane -R + From 0c890626bc737cbbd766b8d98c4d380999bbe662 Mon Sep 17 00:00:00 2001 From: Roberamelaek Date: Mon, 29 Jan 2024 18:50:54 -0500 Subject: [PATCH 12/14] the finnal moving commit --- .config/nvim/init.vim | 5 +++-- gitconfig/gitinstall.sh | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim index fbefda0..f87d44a 100644 --- a/.config/nvim/init.vim +++ b/.config/nvim/init.vim @@ -65,18 +65,19 @@ let g:airline_symbols.readonly = '' let g:airline_symbols.linenr = '' inoremap pumvisible() ? coc#_select_confirm() : "" - " Enable folding based on Markdown headings autocmd FileType markdown setlocal foldmethod=marker autocmd FileType markdown setlocal foldmarker=##,## -command! InsertDate execute 'normal! O=strftime("## %A, %Y-%M-%d")' +command! InsertDate execute 'normal! O=strftime("%b %d, %y")' nnoremap :InsertDate set foldmethod=manual + + syntax enable diff --git a/gitconfig/gitinstall.sh b/gitconfig/gitinstall.sh index bcf6e60..e2f057d 100755 --- a/gitconfig/gitinstall.sh +++ b/gitconfig/gitinstall.sh @@ -1,3 +1,4 @@ +## Sunday, 2023-50-10 #!/bin/bash # Set up global alias shortcuts for Git configurations From 41f01628f14b9d3aa08fa264451fe6b541f4c058 Mon Sep 17 00:00:00 2001 From: Roberamelaek Date: Mon, 29 Jan 2024 20:33:57 -0500 Subject: [PATCH 13/14] this is the other type of installation with neovim add --- README.md | 85 +++++++++++-------- install.sh => scripts/install.sh | 8 +- .../install_init_vim.sh | 0 3 files changed, 56 insertions(+), 37 deletions(-) rename install.sh => scripts/install.sh (88%) rename install_init_vim.sh => scripts/install_init_vim.sh (100%) diff --git a/README.md b/README.md index a971cce..6472136 100644 --- a/README.md +++ b/README.md @@ -1,41 +1,58 @@ # Dotfiles: Configuration Files for Vim, Tmux, and Git -This repository is my personal Configurations file and also comes with an .sh installer. Feel free to configure and personalize the file to suit your preference. +Welcome to my dotfiles repository! This repository contains my personal configuration files for Vim, Tmux, Git, and Neovim, along with installation scripts. Feel free to use these configurations as a starting point and customize them to suit your preferences. -This is the basic sample that you can copy and use. Tips to improve and make it more personalized will be appreciated. +## Contents -Instructions on how to install, use, and personalize will be provided below. +1. `vimrc`: Configuration file for Vim. +2. `tmuxrc`: Configuration file for Tmux. +3. `gitconfig/`: Git configuration files. + - `gitinstall.sh`: Git installation script. +4. `scripts/`: Installation script. + - `install.sh`: Installation script for basic setup. + - `install_enhanced.sh`: Enhanced installation script for additional configurations. +5. `.config/nvim/init.vim`: Configuration file for Neovim. -## Contents +## Installation + +Follow these steps to install and use the configurations provided in this repository: + +### Step 1: Clone the Repository + +Clone the repository to your local machine: + +```bash +git clone https://github.com/Roberamelaek/dotfile.git .dotfiles +``` + +### Step 2: Change into the Repository Directory + +Change into the repository directory: + +```bash +cd .dotfiles +``` + +### Step 3: Run the Basic Installation Script + +Run the basic installation script to set up the configurations: + +```bash +sh scripts/install.sh +``` + +This script installs Vim, Neovim, Tmux, and Git if they are not already installed, and copies the configuration files to your home directory (~/). + +### Step 4: Run the Enhanced Installation (Optional) + +If you want additional configurations, you can run the enhanced installation script: + +```bash +sh scripts/install_enhanced.sh +``` + +This script includes additional configurations beyond the basic setup. Feel free to run it for more customization options. -1. vimrc -2. Tmuxrc -3. gitconfig.sh -4. install.sh - -### Installation - -To install and use the configuration provided in this repository, follow these steps: - -1. Clone the repository to your local machine using the following command: - - ```bash - git clone https://github.com/Roberamelaek/dotfile.git - -2. Rename the dotfile to .dotfile: - - ```bash - mv dotfile .dotfiles - -3. Change into the repository directory: - - ```bash - cd .dotfiles -4. Run the configuration script to install the Vim settings: - ```bash - sh install.sh - -- The files will be copied to your home directory (`~/`) and Vim will be configured accordingly. -- Now you're all set to use the customized Vim configuration! -- Feel free to customize the files before you run sh install.sh have fun with the project and leave feadback for more if you have any questions or helpful and fun ideas!! +### Step 5: Verify Installation +After running the installation script(s), verify that everything is set up correctly by opening Vim, Tmux, or Neovim. If you encounter any issues or have questions, please don't hesitate to report them by opening an issue. diff --git a/install.sh b/scripts/install.sh similarity index 88% rename from install.sh rename to scripts/install.sh index 76d696c..b831c3d 100755 --- a/install.sh +++ b/scripts/install.sh @@ -8,7 +8,7 @@ package_installed() { } # List of packages to check and install -packages=("vim" "tmux" "git") +packages=("vim" "tmux" "git" "neovim") for package in "${packages[@]}"; do if ! package_installed "$package"; then @@ -26,11 +26,13 @@ tmuxrc_path="$HOME/.dotfiles/tmuxrc" vimrc_path="$HOME/.dotfiles/vimrc" gitconfig_path="$HOME/.dotfiles/gitconfig" gitinstall_path="$HOME/.dotfiles/gitconfig/gitinstall.sh" +init_vim_path="$HOME/.dotfiles/.config/nvim/init.vim" # Set the destination directories for the symbolic links nbrc_dest="$HOME/.nbrc" tmuxrc_dest="$HOME/.tmux.conf" vimrc_dest="$HOME/.vimrc" +init_vim_dest="$HOME/.config/nvim/init.vim" # Function to create or recreate symbolic links create_symlink() { @@ -50,12 +52,13 @@ create_symlink() { create_symlink "$nbrc_path" "$nbrc_dest" create_symlink "$tmuxrc_path" "$tmuxrc_dest" create_symlink "$vimrc_path" "$vimrc_dest" +create_symlink "$init_vim_path" "$init_vim_dest" # Run the gitinstall.sh script bash "$gitinstall_path" # Array of file names to source -files=("prompt" "alias") +files=("alias" "prompt") # Add source commands to .bashrc for each file for file in "${files[@]}"; do @@ -64,4 +67,3 @@ for file in "${files[@]}"; do echo "source $filepath" >> "$HOME/.bashrc" fi done - diff --git a/install_init_vim.sh b/scripts/install_init_vim.sh similarity index 100% rename from install_init_vim.sh rename to scripts/install_init_vim.sh From 6dac21c42a16ab06ce6316d9983616e5b9eeb75e Mon Sep 17 00:00:00 2001 From: Roberamelaek Date: Tue, 30 Jan 2024 21:50:32 -0500 Subject: [PATCH 14/14] this is the nvi --- .config/nvim/init.vim | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim index f87d44a..c20f8b4 100644 --- a/.config/nvim/init.vim +++ b/.config/nvim/init.vim @@ -97,3 +97,41 @@ endfunction " Set foldmethod to 'expr' and foldexpr to the custom function for Markdown files autocmd FileType markdown setlocal foldmethod=expr foldexpr=MarkdownFoldExpr() + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +