-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbss.vimrc
More file actions
84 lines (75 loc) · 1.84 KB
/
bss.vimrc
File metadata and controls
84 lines (75 loc) · 1.84 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
74
75
76
77
78
79
80
81
82
83
84
" BashShellSetup : VIM Setup
" File: BashShellSetup/bss.vimrc
" Author: Amit Roy amitrupu@gmail.com
" Date: 28-Jan-2021
" To use it, copy it to
" for Unix and OS/2: ~/.vimrc
" for MS-DOS and Win32: $VIM\_vimrc
" general setup
set nocompatible
set nobackup
set bs=2
" gui mouse - use shift+mouse to copy paste
set mouse=a
" set mouse=
if !has('nvim')
set ttymouse=xterm2
endif
" set ttymouse=sgr
" edit setup
set ruler
set number
set noautoindent
set smartindent
set smarttab
set tabstop=4 " tab width is 4 spaces
set shiftwidth=4 " indent with 4 spaces
" search setup
set showmode
set showmatch
set hlsearch
set incsearch
" syntax setup
syntax enable
highlight Cursor ctermfg=Yellow
"keymap --- F1-9 key mapping ---
"keymap F1 : help on current key mapping
nmap <F1> :!sed -n 's/"\s*keymap\s*\(.*\)/\1/p' ~/.vimrc <CR>
"keymap F2 : save file
map <F2> :w <CR>
"keymap F3 : reload file
map <F3> :e! <CR>
"keymap F4 : toggle line number display
map <F4> :set invnumber <CR>
"keymap F5 : replace tabs with spaces
map <silent> <F5> :set expandtab <CR>
\ :retab <CR>
\ :set noexpandtab <CR>
"keymap F6 : toggle syntax highlighting
map <silent> <F6> : if exists("g:syntax_on") <BAR>
\ syntax off <BAR>
\ else <BAR>
\ syntax enable <BAR>
\ endif <CR>
"keymap F7 : toggle indenting for paste
set pastetoggle=<F7>
"keymap F8 : toggle mouse
map <silent> <F8> : if &mouse== 'a' <BAR>
\ set mouse= <BAR>
\ else <BAR>
\ set mouse=a <BAR>
\ endif <CR>
"keymap F9 : toggle light & dark theme
map <silent> <F9> : if &bg=="dark" <BAR>
\ set bg=light <BAR>
\ else <BAR>
\ set bg=dark <BAR>
\ endif <CR>
" mouse mapping
map <ScrollWheelUp> <C-Y>
map <ScrollWheelDown> <C-E>
" read my vimrc
:let $uservimrc = "~/.vimrc." . $USER
:if filereadable(expand($uservimrc))
: source $uservimrc
:endif