├── .github └── FUNDING.yml ├── README.md └── nvim └── init.vim /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] 4 | patreon: # Replace with a single Patreon username 5 | open_collective: # Replace with a single Open Collective username 6 | ko_fi: kaklabs 7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 | liberapay: # Replace with a single Liberapay username 10 | issuehunt: # Replace with a single IssueHunt username 11 | lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry 12 | polar: # Replace with a single Polar username 13 | buy_me_a_coffee: # Replace with a single Buy Me a Coffee username 14 | thanks_dev: # Replace with a single thanks.dev username 15 | custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] 16 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # kakvim: Neovim Configuration for Ruby (on Rails) Development 2 | 3 | My highly-configured Neovim setup optimized for Ruby (on Rails) development, suitable for both terminal use on macOS and Linux. 4 | 5 | ## Features 6 | 7 | * Includes a collection of essential plugins for productivity and convenience 8 | * Offers a visually pleasing interface with the Solarized theme 9 | * Supports Git integration with `vim-fugitive` 10 | * Provides efficient code navigation and comment capabilities with `NERDTree` and `tcomment` 11 | * Includes support for the Slim template language 12 | * Provides powerful fuzzy file search with `CtrlP` 13 | * Offers tab completion with `Supertab` 14 | * Includes support for editing Ruby on Rails applications with `vim-rails` 15 | * Offers fast, flexible search with `ack.vim`, including string pattern matching 16 | 17 | ## Installation 18 | 19 | 1. Ensure that you have [Neovim](https://neovim.io) installed on your system. 20 | 2. Install [vim-plug](https://github.com/junegunn/vim-plug). 21 | 3. Clone the repository: `git clone git@github.com:kuntoaji/kakvim.git` 22 | 4. Copy the Kakvim configuration file from `nvim/init.vim` to your Neovim `init.vim` or create a symlink with the command: `ln -s ~/your/path/kakvim/nvim/ ~/.config/nvim` 23 | 5. Open Neovim with the command nvim 24 | 6. Run `:PlugInstall` to install all plugins 25 | 7. Reload Neovim 26 | 27 | ## Included Plugins 28 | 29 | * [preser/nerdtree](https://github.com/preservim/nerdtree) - File system explorer 30 | * [tomtom/tcomment_vim](https://github.com/tomtom/tcomment_vim) - Code comment 31 | * [mileszs/ack.vim](https://github.com/mileszs/ack.vim) - Search tool for Vim (requires ack to be installed on Mac): `brew install ack` 32 | * [lifepillar/vim-solarized8](https://github.com/lifepillar/vim-solarized8) - Solarized theme for Vim 33 | * [morhetz/gruvbox](https://github.com/morhetz/gruvbox) - Gruvbox as default colorscheme 34 | * [slim-template/vim-slim](https://github.com/slim-template/vim-slim) - Slim syntax highlighting for Vim 35 | * [ctrlpvim/ctrlp.vim](https://github.com/ctrlpvim/ctrlp.vim) - Full path fuzzy file, buffer, mru, tag finder for Vim 36 | * [tpope/vim-fugitive](https://github.com/tpope/vim-fugitive) - Git integration for Vim 37 | * [ervandew/supertab](https://github.com/ervandew/supertab) - Tab completion 38 | * [tpope/vim-rails](https://github.com/tpope/vim-rails) - Vim plugin for editing Ruby on Rails applications 39 | * [github/copilot.vim](https://github.com/github/copilot.vim) - Vim/Neovim plugin for GitHub Copilot 40 | 41 | ## Key Mappings 42 | 43 | The following custom mappings are available in kakvim: 44 | 45 | | Keyword | Mapping | 46 | | ------------- | ------------- | 47 | | Leader | \ | 48 | | NERDTreeToggle | \g | 49 | | Switch Panes | ctrl-h, ctrl-j, ctrl-k, ctrl-l | 50 | | CtrlPBuffer | \b | 51 | | CtrlP | \t | 52 | 53 | ## Font Configuration 54 | 55 | This configuration uses [Fira Code Retina](https://github.com/tonsky/FiraCode) font with size 13 for Neovim GUI. If Fira Code Retina is not found, it 56 | will fall back to `Monaco` font with size 13. 57 | -------------------------------------------------------------------------------- /nvim/init.vim: -------------------------------------------------------------------------------- 1 | " Set 'nocompatible' to ward off unexpected things that your distro might 2 | " have made, as well as sanely reset options when re-sourcing .vimrc 3 | set nocompatible 4 | 5 | " Install plugins with vim-plug https://github.com/junegunn/vim-plug 6 | " Reload and runs :PlugInstall to install plugins 7 | 8 | call plug#begin('~/.local/share/nvim/plugged') 9 | 10 | Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' } 11 | Plug 'tomtom/tcomment_vim' 12 | Plug 'mileszs/ack.vim' 13 | Plug 'lifepillar/vim-solarized8' 14 | Plug 'morhetz/gruvbox' 15 | Plug 'slim-template/vim-slim' 16 | Plug 'ctrlpvim/ctrlp.vim' 17 | Plug 'tpope/vim-fugitive' 18 | Plug 'ervandew/supertab' 19 | Plug 'tpope/vim-rails' 20 | Plug 'github/copilot.vim' 21 | 22 | call plug#end() 23 | 24 | " Use The Silver Searcher if available 25 | " https://github.com/ggreer/the_silver_searcher 26 | if executable('ag') 27 | let g:ackprg = 'ag --vimgrep' 28 | cnoreabbrev ag Ack 29 | cnoreabbrev aG Ack 30 | cnoreabbrev Ag Ack 31 | cnoreabbrev AG Ack 32 | endif 33 | 34 | " -- Configurations -- 35 | 36 | " Enable syntax highlighting 37 | syntax on 38 | 39 | " Don't wrap long lines 40 | set nowrap 41 | 42 | " Use 2 spaces for tabs 43 | set expandtab 44 | set tabstop=2 45 | set softtabstop=2 46 | set shiftwidth=2 47 | set smarttab 48 | 49 | " Automatically remove all trailing whitespace 50 | autocmd BufWritePre * %s/\s\+$//e 51 | 52 | " Set default colorscheme to solarized 53 | set background=dark 54 | silent! colorscheme gruvbox 55 | 56 | " Enable line numbers and don't make them any wider than necessary 57 | set number numberwidth=2 58 | 59 | " Set GUI font 60 | " get the Fira Code font from https://github.com/tonsky/FiraCode 61 | if has('gui_running') 62 | if executable('fc-list') 63 | let font_exists = system('fc-list | grep -i -q "Fira Code Retina"') 64 | 65 | if font_exists == 0 66 | set guifont=Fira_Code_Retina:h13 67 | else 68 | set guifont=Monaco:h13 69 | endif 70 | endif 71 | endif 72 | 73 | " -- Mappings -- 74 | 75 | " Toggle NERDTreeToggle 76 | nmap g :NERDTreeToggle 77 | 78 | " Switch between panes 79 | nmap j 80 | nmap k 81 | nmap h 82 | nmap l 83 | 84 | " Mapping CtrlP command 85 | nnoremap b :CtrlPBuffer 86 | nnoremap t :CtrlP 87 | --------------------------------------------------------------------------------