Vimrc for use with iVim on iOS
" Set leader to be spacebar
let mapleader=" "
set hlsearch
set incsearch
set laststatus=2
set ruler
set history=100
set autoindent
set backspace=indent,eol,start
" Increase font size on iOS. See :help ifont for more info.
" Set font temporarily in iVim, e.g. :ifont 1 18
set guifont=SourceCodePro-Regular:h18
" Set hidden chars
set listchars=eol:¬,tab:»·,trail:·,nbsp:·
" Make it obvious where 80 characters is
set textwidth=80
set colorcolumn=+1
" Make it obvious where 80 characters is
set textwidth=80
set colorcolumn=+1
" Line numbers
set number
set numberwidth=5
" Open new split panes to right and bottom, which feels more natural
set splitbelow
set splitright
" Quicker window movement between splits
nnoremap <C-j> <C-w>j
nnoremap <C-k> <C-w>k
nnoremap <C-h> <C-w>h
nnoremap <C-l> <C-w>l
" Disable beeping
set visualbell
" Make it easier to switch between buffers
nnoremap <silent> [b :bprevious <CR>
nnoremap <silent> ]b :bnext <CR>
" Press enter after seach to clear highlight
nnoremap <CR> :nohlsearch<CR>
" Leader Remaps
" -------------
" Quickly switch to previous file
nnoremap <leader>e :edit#<CR>
" Easier quitting
nnoremap <leader>q :q<CR>
nnoremap <leader>w :w!<CR>
" Open a new unnamed buffer using ctrl + n
nnoremap <leader>n :enew<CR>
" Toggle display of hidden chars
nmap <leader>l :set list!<CR>