Skip to main content
added 1 character in body
Source Link
Albert
  • 143
  • 6

I've been using Vim for a few weeks now and I find myself constantly using ci" or ci( to change whats enclosed in "" or (). I do also find myself wanting to append inside of the brackets e.g.:

If I have:

if (name == "Frank") {

I want to be anywhere on that line and append && lastName == "Castle" to my condition inside the (). To end up with:

if (name == "Frank" &&& lastName == "Castle") {

OR I want to append Castle to what's inside the "". To end up with:

if (name == "Frank Castle") {

Obviously ai" and ai( doesn't work, since it puts you in append/insert mode and you then just type i"...

Anyone know how to do that, or if it's possible?

I've been using Vim for a few weeks now and I find myself constantly using ci" or ci( to change whats enclosed in "" or (). I do also find myself wanting to append inside of the brackets e.g.:

If I have:

if (name == "Frank") {

I want to be anywhere on that line and append && lastName == "Castle" to my condition inside the (). To end up with:

if (name == "Frank" & lastName == "Castle") {

OR I want to append Castle to what's inside the "". To end up with:

if (name == "Frank Castle") {

Obviously ai" and ai( doesn't work, since it puts you in append/insert mode and you then just type i"...

Anyone know how to do that, or if it's possible?

I've been using Vim for a few weeks now and I find myself constantly using ci" or ci( to change whats enclosed in "" or (). I do also find myself wanting to append inside of the brackets e.g.:

If I have:

if (name == "Frank") {

I want to be anywhere on that line and append && lastName == "Castle" to my condition inside the (). To end up with:

if (name == "Frank" && lastName == "Castle") {

OR I want to append Castle to what's inside the "". To end up with:

if (name == "Frank Castle") {

Obviously ai" and ai( doesn't work, since it puts you in append/insert mode and you then just type i"...

Anyone know how to do that, or if it's possible?

remove greetings, improve tags
Source Link
Friedrich
  • 3.3k
  • 1
  • 13
  • 26

BeenI've been using Vim for a few weeks now and I find myself constantly using ci" or ci( to change whats enclosed in "" or (). I do also find myself wanting to append inside of the brackets e.g.:

If I have:

if (name == "Frank") {

I want to be anywhere on that line and append && lastName == "Castle" to my condition inside the (). To end up with:

if (name == "Frank" & lastName == "Castle") {

OR I want to append Castle to what's inside the "". To end up with:

if (name == "Frank Castle") {

Obviously ai" and ai( doesn't work, since it puts you in append/insert mode and you then just type i"...

Anyone know how to do that, or if it's possible?

Cheers,

Been using Vim for a few weeks now and I find myself constantly using ci" or ci( to change whats enclosed in "" or (). I do also find myself wanting to append inside of the brackets e.g.:

If I have:

if (name == "Frank") {

I want to be anywhere on that line and append && lastName == "Castle" to my condition inside the (). To end up with:

if (name == "Frank" & lastName == "Castle") {

OR I want to append Castle to what's inside the "". To end up with:

if (name == "Frank Castle") {

Obviously ai" and ai( doesn't work, since it puts you in append/insert mode and you then just type i"...

Anyone know how to do that, or if it's possible?

Cheers,

I've been using Vim for a few weeks now and I find myself constantly using ci" or ci( to change whats enclosed in "" or (). I do also find myself wanting to append inside of the brackets e.g.:

If I have:

if (name == "Frank") {

I want to be anywhere on that line and append && lastName == "Castle" to my condition inside the (). To end up with:

if (name == "Frank" & lastName == "Castle") {

OR I want to append Castle to what's inside the "". To end up with:

if (name == "Frank Castle") {

Obviously ai" and ai( doesn't work, since it puts you in append/insert mode and you then just type i"...

Anyone know how to do that, or if it's possible?

Became Hot Network Question
Source Link
Albert
  • 143
  • 6

Append inside brackets, quotes, double quotes

Been using Vim for a few weeks now and I find myself constantly using ci" or ci( to change whats enclosed in "" or (). I do also find myself wanting to append inside of the brackets e.g.:

If I have:

if (name == "Frank") {

I want to be anywhere on that line and append && lastName == "Castle" to my condition inside the (). To end up with:

if (name == "Frank" & lastName == "Castle") {

OR I want to append Castle to what's inside the "". To end up with:

if (name == "Frank Castle") {

Obviously ai" and ai( doesn't work, since it puts you in append/insert mode and you then just type i"...

Anyone know how to do that, or if it's possible?

Cheers,