Skip to content

Commit 08d3e08

Browse files
authored
Merge pull request #2 from biglinux/testing-2024-11-29_16-57
fix: Configuration adjustment.
2 parents 6db0866 + 8adb6bd commit 08d3e08

3 files changed

Lines changed: 62 additions & 27 deletions

File tree

README.md

Lines changed: 35 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -5,25 +5,35 @@ This repository contains a custom Vim configuration designed to enhance usabilit
55
## Features
66

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

1314
- **Mouse Support**:
14-
- Enables mouse functionality if available.
15+
- Enables mouse functionality in visual mode (`set mouse=v`), if supported.
16+
17+
- **Cursor Highlighting**:
18+
- Highlights the entire line where the cursor is positioned for better focus (`cursorline`).
19+
20+
- **Vi Compatibility**:
21+
- Ensures Vim is not in compatibility mode with Vi, enabling modern features (`nocompatible`).
22+
23+
- **Color Scheme**:
24+
- Sets the color scheme to `codedark` for a modern look.
1525

1626
- **Filetype-Specific Indentation**:
17-
- HTML: 2 spaces for tabs and indentation.
18-
- Python: 4 spaces for tabs and indentation.
19-
- YAML: 2 spaces for tabs and indentation with custom indent keys.
27+
- **HTML**: 2 spaces for tabs and indentation.
28+
- **Python**: 4 spaces for tabs and indentation.
29+
- **YAML**: 2 spaces for tabs and indentation with custom indent keys.
2030

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

2535
- **Status Line**:
26-
- Displays file information, working directory, and cursor position.
36+
- Displays detailed information, including file name, working directory, cursor position, and more.
2737

2838
## Configuration Details
2939

@@ -32,14 +42,19 @@ syntax on
3242
filetype plugin indent on
3343
3444
" Search and encoding settings
35-
set noincsearch " Disables incremental search
36-
set ignorecase " Ignores case in search patterns
37-
set encoding=utf8 " Sets file encoding to UTF-8
38-
set laststatus=2 " Always display the status line
39-
set hlsearch " Highlights all matches in search results
40-
set showmatch " Highlights matching parenthesis/brackets
41-
42-
" Mouse support
45+
set noincsearch " Disables incremental search; highlights only on Enter
46+
set ignorecase " Ignores case in search patterns for easier matching
47+
set encoding=utf8 " Sets file encoding to UTF-8 for better compatibility
48+
set laststatus=2 " Always displays the status line at the bottom of the screen
49+
set hlsearch " Highlights all matches for search results to improve visibility
50+
set showmatch " Briefly highlights matching parentheses, brackets, or braces
51+
set cursorline " Highlights the entire line where the cursor is positioned for better focus
52+
set nocompatible " Ensures Vim is not in Vi mode
53+
54+
" Color Scheme
55+
colorscheme codedark
56+
57+
" Enables mouse support if available
4358
if has("mouse")
4459
set mouse=v " Enables mouse support in visual mode
4560
endif
@@ -64,8 +79,8 @@ autocmd FileType html call HtmlConfig()
6479
autocmd FileType python call PythonConfig()
6580
autocmd FileType yaml,yml call YamlConfig()
6681
67-
" Status line
82+
" Status line configuration
6883
set statusline=\ File:\ %F%m%r%h\ %w\ \ Working\ Directory:\ %r%{getcwd()}%h\ -\ Line:\ %l\ -\ Column:\ %c
6984
7085
" Prevent defaults.vim from overwriting these settings
71-
let g:skip_defaults_vim = 1
86+
let g:skip_defaults_vim = 1

etc/vimrc

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,18 @@ syntax on
22
filetype plugin indent on
33

44
" Search and encoding settings
5-
set noincsearch " Disables incremental search; highlights only on Enter
6-
set ignorecase " Ignores case in search patterns
7-
set encoding=utf8 " Sets file encoding to UTF-8
8-
set laststatus=2 " Always display the status line at the bottom
9-
set hlsearch " Highlights all matches in search results
10-
set showmatch
5+
6+
set noincsearch " Disables incremental search; matches are only highlighted after pressing Enter
7+
set ignorecase " Ignores case in search patterns for easier matching
8+
set encoding=utf8 " Sets file encoding to UTF-8 for better compatibility
9+
set laststatus=2 " Always displays the status line at the bottom of the screen
10+
set hlsearch " Highlights all matches for search results to improve visibility
11+
set showmatch " Briefly highlights matching parentheses, brackets, or braces
12+
set cursorline " Highlights the entire line where the cursor is positioned for better focus
13+
set nocompatible " Ensures Vim is not in Vi mode
14+
15+
"Color Scheme
16+
colorscheme codedark
1117

1218
" Enables mouse support if available
1319
if has("mouse")

pkgbuild/biglinux-vim-config.install

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,25 @@ post_install() {
1010
if [ -f /etc/vimrc.new ]; then
1111
mv -f /etc/vimrc.new /etc/vimrc
1212
fi
13+
# Check if the directory for plugins exists, create if it doesn't
14+
if [ ! -d /usr/share/vim/vimfiles/pack/git-plugins/start ]; then
15+
mkdir -p /usr/share/vim/vimfiles/pack/git-plugins/start
16+
fi
17+
# Clone vim-code-dark repository if it doesn't already exist
18+
if [ ! -d /usr/share/vim/vimfiles/pack/git-plugins/start/vim-code-dark ]; then
19+
git clone https://github.com/tomasiser/vim-code-dark /usr/share/vim/vimfiles/pack/git-plugins/start/vim-code-dark
20+
fi
21+
# Set appropriate permissions
22+
chmod -R a+rx /usr/share/vim/vimfiles/pack/git-plugins/start/vim-code-dark
1323
}
1424

1525
# Restore the original file
1626
post_remove() {
1727
if [ -f /etc/vimrc.bkp ]; then
1828
mv -f /etc/vimrc.bkp /etc/vimrc
1929
fi
20-
}
30+
# Remove the plugin directory if it is empty
31+
if [ -d /usr/share/vim/vimfiles/pack/git-plugins ]; then
32+
rm -rf /usr/share/vim/vimfiles/pack/git-plugins
33+
fi
34+
}

0 commit comments

Comments
 (0)