^我在git bash的VI中扮演角色

时间:2015-11-03 09:03:46

标签: vi git-bash

我在Windows上运行git bash。

我从http://www.chrismoos.com/2014/05/28/coreos-with-cloud-config-on-vmware-esxi

复制下面的文字
  

cloud-config hostname:my-hostname ssh_authorized_keys:

bool load(const char* dictionary)
{
    //Open dictionary file && safecheck
    FILE* d_file = fopen(dictionary,"r");
    if(d_file == NULL) { return false; }

    //allocate space for the first node
    root = calloc(1,sizeof(node));

    //string buffer
    char word[SIZE+1];
    //loop through each word of the dictionary and store it to word
    while(fscanf(d_file,"%s\n",word)!=EOF){
        //navigation node steping further into trie
        node* nav = root;
        int word_length = strlen(word);
        //Iterate through each letter in a word
        for(int i=0;i<word_length;i++){
            int letter_pos = tolower(word[i]) - 'a';
            //check if letter node exists
            if(nav->children[letter_pos]==NULL){
                //create node for a letter
                node* l_node = calloc(1,sizeof(node));
                if(l_node == NULL) { return false; }
                nav->children[letter_pos] = l_node;
            }
            //proceed to the next node
            if(i < word_length-1)
                nav = nav->children[letter_pos];
        }
        //set word to true;
        if(nav->is_word != true){
            nav->is_word = true;
            // counter for total words in the dictionary
            SIZE++;
        }
    }
    fclose(d_file);
    return true;
}
  • 并在VI中粘贴,变成

^I Character in VI of GIT BASH

我该如何解决?什么是我的角色?

1 个答案:

答案 0 :(得分:0)

^我是标签字符。

:%s/(键入tab键)/ /g

应该可以用4个空格替换每个标签。