-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.vimrc
More file actions
73 lines (59 loc) · 1.8 KB
/
Copy path.vimrc
File metadata and controls
73 lines (59 loc) · 1.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
" Basic Vim configuration for Vim 9.x
" This provides sensible defaults for basic editing
" Use Vim settings, rather than Vi settings
set nocompatible
" Enable syntax highlighting
syntax on
" Enable file type detection
filetype plugin indent on
" Set sensible tab settings
set tabstop=4
set shiftwidth=4
set expandtab
set smarttab
set autoindent
" Basic interface settings
set number " Show line numbers
set ruler " Show cursor position
set showcmd " Show incomplete commands
set showmode " Show current mode
set wildmenu " Enhanced command-line completion
set laststatus=2 " Always show status line
set scrolloff=3 " Keep 3 lines between cursor and edge
" Search settings
set incsearch " Incremental search
set hlsearch " Highlight search matches
set ignorecase " Case insensitive searching
set smartcase " Case sensitive if pattern contains uppercase
" Backup and swap settings
set nobackup " Don't use backup files
set nowritebackup " Don't backup file while editing
set noswapfile " Don't use swapfile
" Mouse support
set mouse=a " Enable mouse in all modes
" Leader key
let mapleader = ','
" Basic key mappings
" Clear search highlight
nnoremap <leader>q :nohlsearch<CR>
" Buffer navigation
nnoremap <leader>bn :bnext<CR>
nnoremap <leader>bp :bprevious<CR>
nnoremap <leader>bd :bdelete<CR>
" Window navigation
nnoremap <C-h> <C-w>h
nnoremap <C-j> <C-w>j
nnoremap <C-k> <C-w>k
nnoremap <C-l> <C-w>l
" Enable clipboard integration if available
if has('clipboard')
set clipboard=unnamed
if has('unnamedplus')
set clipboard+=unnamedplus
endif
endif
" Return to last edit position when opening files
autocmd BufReadPost *
\ if line("'\"") > 0 && line("'\"") <= line("$") |
\ exe "normal! g`\"" |
\ endif