vim: improved line numbers
This commit is contained in:
parent
612b57f18e
commit
8ff4454f91
|
@ -58,6 +58,9 @@
|
||||||
# bell
|
# bell
|
||||||
set-window-option -g window-status-bell-style bg=colour167,fg=colour235 # bg=red, fg=bg
|
set-window-option -g window-status-bell-style bg=colour167,fg=colour235 # bg=red, fg=bg
|
||||||
|
|
||||||
|
# focus
|
||||||
|
set-option -g focus-events on
|
||||||
|
|
||||||
## Theme settings mixed with colors (unfortunately, but there is no cleaner way)
|
## Theme settings mixed with colors (unfortunately, but there is no cleaner way)
|
||||||
set-option -g status-justify "left"
|
set-option -g status-justify "left"
|
||||||
set-option -g status-left-style none
|
set-option -g status-left-style none
|
||||||
|
|
|
@ -5,7 +5,8 @@ vim_configurable.customize {
|
||||||
# Below you can specify what usually goes into `~/.vimrc`
|
# Below you can specify what usually goes into `~/.vimrc`
|
||||||
vimrcConfig.customRC = ''
|
vimrcConfig.customRC = ''
|
||||||
" Preferred global default settings:
|
" Preferred global default settings:
|
||||||
set number " Enable line numbers by default
|
set number relativenumber " Enable relative line numbers by default
|
||||||
|
set cursorline " Highlight the current line number
|
||||||
set smartindent " Automatically insert extra level of indentation
|
set smartindent " Automatically insert extra level of indentation
|
||||||
set tabstop=4 " Default tabstop
|
set tabstop=4 " Default tabstop
|
||||||
set shiftwidth=4 " Default indent spacing
|
set shiftwidth=4 " Default indent spacing
|
||||||
|
@ -32,6 +33,9 @@ vim_configurable.customize {
|
||||||
%s/\s\+$//e
|
%s/\s\+$//e
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
" Trigger for numbertoggle to switch modes
|
||||||
|
nnoremap <silent> <C-n> :set relativenumber!<CR>
|
||||||
|
|
||||||
nnoremap <silent> <Leader>RemoveTrailingWhiteSpace :call TrimWhiteSpace()<CR>
|
nnoremap <silent> <Leader>RemoveTrailingWhiteSpace :call TrimWhiteSpace()<CR>
|
||||||
autocmd FileWritePre * :call TrimWhiteSpace()
|
autocmd FileWritePre * :call TrimWhiteSpace()
|
||||||
autocmd FileAppendPre * :call TrimWhiteSpace()
|
autocmd FileAppendPre * :call TrimWhiteSpace()
|
||||||
|
@ -254,6 +258,7 @@ vim_configurable.customize {
|
||||||
endfunction
|
endfunction
|
||||||
autocmd BufNewFile,BufFilePre,BufRead bzr_* :call BzrSettings()
|
autocmd BufNewFile,BufFilePre,BufRead bzr_* :call BzrSettings()
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# store your plugins in Vim packages
|
# store your plugins in Vim packages
|
||||||
vimrcConfig.packages.myVimPackage = with pkgs.vimPlugins; {
|
vimrcConfig.packages.myVimPackage = with pkgs.vimPlugins; {
|
||||||
start = [ # Plugins loaded on launch
|
start = [ # Plugins loaded on launch
|
||||||
|
@ -262,6 +267,7 @@ vim_configurable.customize {
|
||||||
fugitive # Vim Git wrapper
|
fugitive # Vim Git wrapper
|
||||||
gruvbox # Install the gruvbox theme
|
gruvbox # Install the gruvbox theme
|
||||||
haskell-vim # Syntax Highlighting and Indentation for Haskell
|
haskell-vim # Syntax Highlighting and Indentation for Haskell
|
||||||
|
indentLine # Display thin vertical lines at each indentation level
|
||||||
neocomplete-vim # Keyword completion system
|
neocomplete-vim # Keyword completion system
|
||||||
nerdcommenter # Comment functions so powerful—no comment necessary
|
nerdcommenter # Comment functions so powerful—no comment necessary
|
||||||
nerdtree # File system explorer
|
nerdtree # File system explorer
|
||||||
|
@ -278,6 +284,7 @@ vim_configurable.customize {
|
||||||
vim-colorschemes # Collection of ViM colour schemes
|
vim-colorschemes # Collection of ViM colour schemes
|
||||||
vim-cue # Cue filetype plugin for Vim
|
vim-cue # Cue filetype plugin for Vim
|
||||||
vim-nix # Support for writing Nix expressions in vim
|
vim-nix # Support for writing Nix expressions in vim
|
||||||
|
vim-numbertoggle # Toggle between relative / absolute line numbers automatically
|
||||||
vim-polyglot # A solid language pack for Vim
|
vim-polyglot # A solid language pack for Vim
|
||||||
];
|
];
|
||||||
# manually loadable by calling `:packadd $plugin-name`
|
# manually loadable by calling `:packadd $plugin-name`
|
||||||
|
|
Loading…
Reference in a new issue