I think you will be glad to have a look at :help omap-info
. You can specify mappings for exactly this case, when a text object or movement is expected.
Since you want text-objects, rather than movements, i guess you have to use these:
onoremap iö i[
vnoremap iö i[
onoremap aö a[
vnoremap aö a[
onoremap iä i[
vnoremap iä i[
onoremap aä a[
vnoremap aä a[
onoremap iÖ i{
vnoremap iÖ i{
onoremap aÖ a{
vnoremap aÖ a{
onoremap iÄ i{
vnoremap iÄ i{
onoremap aÄ a{
vnoremap aÄ a{
As @VanLaser pointed out, the f
and t
take commands take characters, not movements or text objects. I just learned about :lmap
and language-mapping
myself, but could not get it to work. A brainless workaround would be this:
nnoremap tö t[
nnoremap fö f[
nnoremap tä t]
nnoremap fä f]
nnoremap Tö T[
nnoremap Fö F[
nnoremap Tä T]
nnoremap Fä F]
nnoremap tÖ t{
nnoremap fÖ f{
nnoremap tÄ t}
nnoremap fÄ f}
nnoremap TÖ T{
nnoremap FÖ F{
nnoremap TÄ T}
nnoremap FÄ F}
<C-ö>
mappings, and this is without the Control key...f{
won't work by just mapping stuff - doesn'tf
want the actual character it sees in the searched text? You will probably have to mapfä
tof]
and so on, to get that type of functionality. At this point, I'd solve the problem at OS level, by adding a US layout and switch (maybe automatically) between DE and US as need arises. OTOH, it's entirely possible I'm missing something with Vim (this always happens) :)inoremap
s such asinoremap aa ä
and so on, to insert your specific characters.