2020-09-20 05:22:17 +00:00
|
|
|
" Set leader as space bar
|
|
|
|
|
let mapleader="\<Space>"
|
2023-04-25 20:00:23 +00:00
|
|
|
let maplocalleader="\<Space>"
|
2020-09-20 05:22:17 +00:00
|
|
|
|
2022-06-12 19:25:17 +00:00
|
|
|
" Use the system clipboard with yank and paste
|
|
|
|
|
set clipboard=unnamedplus
|
2020-09-20 05:22:17 +00:00
|
|
|
|
2022-06-12 19:25:17 +00:00
|
|
|
" Setup better searching
|
|
|
|
|
set ignorecase
|
2020-09-20 05:22:17 +00:00
|
|
|
set incsearch
|
2023-11-04 07:28:30 +00:00
|
|
|
set nohlsearch
|
2022-06-12 19:25:17 +00:00
|
|
|
set smartcase
|
2020-09-20 05:22:17 +00:00
|
|
|
|
2022-06-12 19:25:17 +00:00
|
|
|
" Stay 20 chars from the top and bottom of the buffer so I am always editing
|
|
|
|
|
" in context
|
|
|
|
|
set scrolloff=20
|
2020-09-20 05:22:17 +00:00
|
|
|
|
|
|
|
|
" Using the mouse
|
|
|
|
|
set mouse=a
|
|
|
|
|
|
2022-09-08 19:39:10 +00:00
|
|
|
" Ensure `split` is made below and `vsplit` are make to the right of the
|
|
|
|
|
" current window
|
|
|
|
|
set splitright
|
|
|
|
|
set splitbelow
|
|
|
|
|
|
2020-09-20 05:22:17 +00:00
|
|
|
" Tabs and indenting
|
2022-09-08 19:42:08 +00:00
|
|
|
set tabstop=2
|
|
|
|
|
set shiftwidth=2
|
2020-09-20 05:22:17 +00:00
|
|
|
set expandtab
|
|
|
|
|
set autoindent
|
|
|
|
|
filetype plugin indent on
|
|
|
|
|
|
2022-06-12 19:25:17 +00:00
|
|
|
" Highlight the current line where the cursor is on
|
|
|
|
|
set cursorline
|
|
|
|
|
let g:vim_json_conceal=0
|
|
|
|
|
|
2023-02-21 16:50:54 +00:00
|
|
|
set list listchars=tab:--▷,trail:•,precedes:«,extends:»
|
|
|
|
|
|
2022-06-12 19:25:17 +00:00
|
|
|
" Relative line numbers, this set line numbers a swell so the current line is
|
|
|
|
|
" displayed correctly. If this is not set then the current line is always 0
|
|
|
|
|
set relativenumber
|
|
|
|
|
set number
|
|
|
|
|
|
|
|
|
|
set conceallevel=0
|
|
|
|
|
|
|
|
|
|
" Ensure the signcolumn is on to stop jumping for LSP diagnostics
|
|
|
|
|
set signcolumn=yes
|
|
|
|
|
|
|
|
|
|
" Disable swap files
|
|
|
|
|
set noswapfile
|
|
|
|
|
|
|
|
|
|
" Disable line wrapping
|
|
|
|
|
set nowrap
|
|
|
|
|
|
|
|
|
|
noremap <silent> <leader>q :bdelete<cr>
|
2023-04-25 20:06:05 +00:00
|
|
|
noremap <silent> <leader>fs :w ++p<cr>
|
2022-06-12 19:25:17 +00:00
|
|
|
|
2023-04-25 20:14:52 +00:00
|
|
|
noremap <silent> <leader>o :Open<cr>
|
2020-09-20 05:22:17 +00:00
|
|
|
|
2023-12-11 20:29:57 +00:00
|
|
|
noremap <silent> <leader><leader> za
|
|
|
|
|
|
2020-09-20 05:22:17 +00:00
|
|
|
noremap <silent> [b :bp<cr>
|
|
|
|
|
noremap <silent> ]b :bn<cr>
|
|
|
|
|
|
|
|
|
|
noremap <silent> [q :cprevious<cr>
|
|
|
|
|
noremap <silent> ]q :cnext<cr>
|
|
|
|
|
|
2023-12-11 20:29:57 +00:00
|
|
|
noremap <silent> [f zk
|
|
|
|
|
noremap <silent> ]f zj
|
|
|
|
|
|
2023-08-21 07:32:49 +00:00
|
|
|
" Add binding to "git open" to open the current file in the browser at the
|
|
|
|
|
" current line. For some reason `:GBrowse` will only open the file and not go
|
|
|
|
|
" to the line unless I use visual mode to select the line and then run
|
|
|
|
|
" `:GBrowse`
|
|
|
|
|
noremap <silent> go <c-v>:GBrowse<cr>
|
|
|
|
|
|
2022-06-12 19:25:17 +00:00
|
|
|
inoremap <M-;> <esc>A;
|
2020-09-20 05:22:17 +00:00
|
|
|
|
2022-06-12 19:25:17 +00:00
|
|
|
noremap <leader>; gcc
|
|
|
|
|
"vnoremap <leader>; gc
|
2020-09-20 05:22:17 +00:00
|
|
|
|
2022-06-12 19:25:17 +00:00
|
|
|
inoremap jj <esc>:w<cr>
|
|
|
|
|
nnoremap <leader><tab> <c-^>
|
2022-07-07 18:54:49 +00:00
|
|
|
|
2023-06-02 15:52:03 +00:00
|
|
|
|
|
|
|
|
" Add mapping to "Run" tasks from the taskfile
|
|
|
|
|
"
|
|
|
|
|
" This needs to be added here so its defined before the Ferret plugin is
|
|
|
|
|
" loaded. Ferret adds a mapping to <leader>r only if one is not defined. If we
|
|
|
|
|
" do this in the taksfile plugin it will be too late and the Ferret mapping
|
|
|
|
|
" will only be added.
|
|
|
|
|
nmap <silent> <Leader>r :IvyTaskfile<cr>
|
|
|
|
|
|
2022-07-07 18:54:49 +00:00
|
|
|
" Use the CommandTWildIgnore insted of the wildignore so I can still get
|
|
|
|
|
" completion for :e in folders like vendor or node_modules but, they will be
|
|
|
|
|
" ignored from command-t file searches.
|
|
|
|
|
let g:CommandTWildIgnore="*/node_modules/*,*/vendor/*,*/runtime/*,*/public_html/*,*/pack/*"
|
2020-09-20 05:22:17 +00:00
|
|
|
|