I want to disable my VIM-arrows in VIM, to get used to move the cursor using hjkl. I have tried a lot of different approaches found on this forum, however, i can't seem to disable the up and down buttons in 'Insert Mode'.
Heres my .vimrc:
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'
Plugin 'Valloric/YouCompleteMe'
" All of your Plugins must be added before the following line
call vundle#end() " required
filetype plugin indent on " required
" To ignore plugin indent changes, instead use:
"filetype plugin on
"
" Brief help
" :PluginList - lists configured plugins
" :PluginInstall - installs plugins; append `!` to update or just :PluginUpdate
" :PluginSearch foo - searches for foo; append `!` to refresh local cache
" :PluginClean - confirms removal of unused plugins; append `!` to auto-approve removal
"
" see :h vundle for more details or wiki for FAQ
" Put your non-Plugin stuff after this line
" Removes preview window in YCM.
set completeopt-=preview
" Set clipboard to system clipboard
set clipboard=unnamedplus
" Enable pathogen
execute pathogen#infect()
" F# syntax on .fsi files. (.fsx and .fs are supported automaticly by plugin)
autocmd BufNewFile,BufRead *.fsi set syntax=fsharp
" Set numbers on side.
"
set number
" Disables arrow keys.
" Remove newbie crutches in Command Mode
cnoremap <Down> <Nop>
cnoremap <Left> <Nop>
cnoremap <Right> <Nop>
cnoremap <Up> <Nop>
" Disable Arrow keys in Insert mode
inoremap <Up> <Nop>
inoremap <Down> <Nop>
inoremap <Left> <Nop>
inoremap <Right> <Nop>
" Remove newbie crutches in Normal Mode
nnoremap <Down> <Nop>
nnoremap <Left> <Nop>
nnoremap <Right> <Nop>
nnoremap <Up> <Nop>
" Remove newbie crutches in Visual Mode
vnoremap <Down> <Nop>
vnoremap <Left> <Nop>
vnoremap <Right> <Nop>
vnoremap <Up> <Nop>
Arrow remapping is found in the bottom of .vimrc. Alongside inoremap, i have tried imap and this solution:
noremap <Up> ""
noremap! <Up> <Esc>
noremap <Down> ""
noremap! <Down> <Esc>
noremap <Left> ""
noremap! <Left> <Esc>
noremap <Right> ""
noremap! <Right> <Esc>
Found on https://stackoverflow.com/questions/23548932/how-do-i-disable-the-arrow-keys-in-insert-mode.
Rn everything but Up and Down in 'Insert mode' is disabled.
Keyboard layout: Danish, Ubuntu 18.04 Vim: 8.0.1453
:verbose imap <Up>
after you open Vim?