From 87fc09809510e9ad62d16bcfb77e32f8a089bd9a Mon Sep 17 00:00:00 2001 From: leoberbert Date: Tue, 21 Jan 2025 10:10:24 -0300 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20fix:=20Remove=20hook=20vim=20config?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../libalpm/hooks/biglinux-vim-remove.hook | 9 ---- .../usr/share/libalpm/hooks/biglinux-vim.hook | 10 ---- .../libalpm/scripts/biglinux-install-vim | 54 ------------------- 3 files changed, 73 deletions(-) delete mode 100644 biglinux-improve-compatibility/usr/share/libalpm/hooks/biglinux-vim-remove.hook delete mode 100644 biglinux-improve-compatibility/usr/share/libalpm/hooks/biglinux-vim.hook delete mode 100755 biglinux-improve-compatibility/usr/share/libalpm/scripts/biglinux-install-vim diff --git a/biglinux-improve-compatibility/usr/share/libalpm/hooks/biglinux-vim-remove.hook b/biglinux-improve-compatibility/usr/share/libalpm/hooks/biglinux-vim-remove.hook deleted file mode 100644 index 26e40be..0000000 --- a/biglinux-improve-compatibility/usr/share/libalpm/hooks/biglinux-vim-remove.hook +++ /dev/null @@ -1,9 +0,0 @@ -[Trigger] -Operation = Remove -Type = Package -Target = vim - -[Action] -Description = Remove custom configuration for Vim -When = PostTransaction -Exec = /bin/sh -c "rm -f /etc/vimrc" diff --git a/biglinux-improve-compatibility/usr/share/libalpm/hooks/biglinux-vim.hook b/biglinux-improve-compatibility/usr/share/libalpm/hooks/biglinux-vim.hook deleted file mode 100644 index 55b1c93..0000000 --- a/biglinux-improve-compatibility/usr/share/libalpm/hooks/biglinux-vim.hook +++ /dev/null @@ -1,10 +0,0 @@ -[Trigger] -Operation = Install -Operation = Upgrade -Type = Package -Target = vim - -[Action] -Description = Apply custom configuration for Vim -When = PostTransaction -Exec = /bin/sh -c "/usr/share/libalpm/scripts/biglinux-install-vim" diff --git a/biglinux-improve-compatibility/usr/share/libalpm/scripts/biglinux-install-vim b/biglinux-improve-compatibility/usr/share/libalpm/scripts/biglinux-install-vim deleted file mode 100755 index 83aaf41..0000000 --- a/biglinux-improve-compatibility/usr/share/libalpm/scripts/biglinux-install-vim +++ /dev/null @@ -1,54 +0,0 @@ -#!/bin/sh - -# Define the configuration to be added -vim_config=' -" Enables syntax highlighting and filetype-based plugin and indentation settings -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 - -" Enables mouse support if available -if has("mouse") - set mouse=v -endif - - -" Configures indentation settings specifically for HTML files -function HtmlConfig() - set tabstop=2 softtabstop=2 expandtab shiftwidth=2 - " Sets tab, soft tab, and indentation width to 2 spaces for HTML files -endfunction - -" Configures indentation settings specifically for Python files -function PythonConfig() - set tabstop=4 softtabstop=4 expandtab shiftwidth=4 - " Sets tab, soft tab, and indentation width to 4 spaces for Python files -endfunction - -" Configures indentation settings specifically for YAML files -function YamlConfig() - set tabstop=2 softtabstop=2 expandtab shiftwidth=2 indentkeys-=0# indentkeys-=<:> - " Sets tab, soft tab, and indentation width to 2 spaces for YAML files, - " with custom indent keys -endfunction - -" Autocommands for automatic behavior -autocmd CursorHoldI * stopinsert " Exits Insert mode if cursor is idle for updatetime duration -autocmd FileType html call HtmlConfig() " Applies HtmlConfig() for HTML files -autocmd FileType python call PythonConfig() " Applies PythonConfig() for Python files -autocmd FileType yaml,yml call YamlConfig() " Applies YamlConfig() for YAML files - -" Status line configuration to show paste mode status, file information, working directory, -" and cursor position details -set statusline=\ File:\ %F%m%r%h\ %w\ \ Working\ Directory:\ %r%{getcwd()}%h\ -\ Line:\ %l\ -\ Column:\ %c -" Prevents defaults.vim from overwriting these settings -let g:skip_defaults_vim = 1 -' -# Overwrite /etc/vimrc with the desired configuration -echo "$vim_config" > /etc/vimrc