Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 35 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,35 @@ This repository contains a custom Vim configuration designed to enhance usabilit
## Features

- **Search and Encoding**:
- Highlights all matches in search results.
- Highlights all matches in search results (`hlsearch`).
- Ignores case in search patterns (`ignorecase`).
- Sets file encoding to UTF-8.
- Disables incremental search (`noincsearch`).
- Disables incremental search, highlighting matches only after pressing Enter (`noincsearch`).
- Sets file encoding to UTF-8 (`encoding=utf8`).
- Always displays the status line at the bottom of the screen (`laststatus=2`).

- **Mouse Support**:
- Enables mouse functionality if available.
- Enables mouse functionality in visual mode (`set mouse=v`), if supported.

- **Cursor Highlighting**:
- Highlights the entire line where the cursor is positioned for better focus (`cursorline`).

- **Vi Compatibility**:
- Ensures Vim is not in compatibility mode with Vi, enabling modern features (`nocompatible`).

- **Color Scheme**:
- Sets the color scheme to `codedark` for a modern look.

- **Filetype-Specific Indentation**:
- HTML: 2 spaces for tabs and indentation.
- Python: 4 spaces for tabs and indentation.
- YAML: 2 spaces for tabs and indentation with custom indent keys.
- **HTML**: 2 spaces for tabs and indentation.
- **Python**: 4 spaces for tabs and indentation.
- **YAML**: 2 spaces for tabs and indentation with custom indent keys.

- **Autocommands**:
- Exits Insert mode if idle for a defined period.
- Automatically applies filetype-specific indentation.
- Exits Insert mode automatically if idle for a defined period (`CursorHoldI`).
- Applies filetype-specific indentation settings when opening files.

- **Status Line**:
- Displays file information, working directory, and cursor position.
- Displays detailed information, including file name, working directory, cursor position, and more.

## Configuration Details

Expand All @@ -32,14 +42,19 @@ syntax on
filetype plugin indent on

" Search and encoding settings
set noincsearch " Disables incremental search
set ignorecase " Ignores case in search patterns
set encoding=utf8 " Sets file encoding to UTF-8
set laststatus=2 " Always display the status line
set hlsearch " Highlights all matches in search results
set showmatch " Highlights matching parenthesis/brackets

" Mouse support
set noincsearch " Disables incremental search; highlights only on Enter
set ignorecase " Ignores case in search patterns for easier matching
set encoding=utf8 " Sets file encoding to UTF-8 for better compatibility
set laststatus=2 " Always displays the status line at the bottom of the screen
set hlsearch " Highlights all matches for search results to improve visibility
set showmatch " Briefly highlights matching parentheses, brackets, or braces
set cursorline " Highlights the entire line where the cursor is positioned for better focus
set nocompatible " Ensures Vim is not in Vi mode

" Color Scheme
colorscheme codedark

" Enables mouse support if available
if has("mouse")
set mouse=v " Enables mouse support in visual mode
endif
Expand All @@ -64,8 +79,8 @@ autocmd FileType html call HtmlConfig()
autocmd FileType python call PythonConfig()
autocmd FileType yaml,yml call YamlConfig()

" Status line
" Status line configuration
set statusline=\ File:\ %F%m%r%h\ %w\ \ Working\ Directory:\ %r%{getcwd()}%h\ -\ Line:\ %l\ -\ Column:\ %c

" Prevent defaults.vim from overwriting these settings
let g:skip_defaults_vim = 1
let g:skip_defaults_vim = 1
18 changes: 12 additions & 6 deletions etc/vimrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,18 @@ syntax on
filetype plugin indent on

" Search and encoding settings
set noincsearch " Disables incremental search; highlights only on Enter
set ignorecase " Ignores case in search patterns
set encoding=utf8 " Sets file encoding to UTF-8
set laststatus=2 " Always display the status line at the bottom
set hlsearch " Highlights all matches in search results
set showmatch

set noincsearch " Disables incremental search; matches are only highlighted after pressing Enter
set ignorecase " Ignores case in search patterns for easier matching
set encoding=utf8 " Sets file encoding to UTF-8 for better compatibility
set laststatus=2 " Always displays the status line at the bottom of the screen
set hlsearch " Highlights all matches for search results to improve visibility
set showmatch " Briefly highlights matching parentheses, brackets, or braces
set cursorline " Highlights the entire line where the cursor is positioned for better focus
set nocompatible " Ensures Vim is not in Vi mode

"Color Scheme
colorscheme codedark

" Enables mouse support if available
if has("mouse")
Expand Down
16 changes: 15 additions & 1 deletion pkgbuild/biglinux-vim-config.install
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,25 @@ post_install() {
if [ -f /etc/vimrc.new ]; then
mv -f /etc/vimrc.new /etc/vimrc
fi
# Check if the directory for plugins exists, create if it doesn't
if [ ! -d /usr/share/vim/vimfiles/pack/git-plugins/start ]; then
mkdir -p /usr/share/vim/vimfiles/pack/git-plugins/start
fi
# Clone vim-code-dark repository if it doesn't already exist
if [ ! -d /usr/share/vim/vimfiles/pack/git-plugins/start/vim-code-dark ]; then
git clone https://github.com/tomasiser/vim-code-dark /usr/share/vim/vimfiles/pack/git-plugins/start/vim-code-dark
fi
# Set appropriate permissions
chmod -R a+rx /usr/share/vim/vimfiles/pack/git-plugins/start/vim-code-dark
}

# Restore the original file
post_remove() {
if [ -f /etc/vimrc.bkp ]; then
mv -f /etc/vimrc.bkp /etc/vimrc
fi
}
# Remove the plugin directory if it is empty
if [ -d /usr/share/vim/vimfiles/pack/git-plugins ]; then
rm -rf /usr/share/vim/vimfiles/pack/git-plugins
fi
}