Atom copy and pasting problem


#1

Hello everyone, when ever I try copying or pasteing in atom, it seems add tabs. I’m editing .cpp files.

For example:

When I copy the following code and paste it somewhere else in the same file or a different one using atom this is what happens


void foo()
{
   int foo;
}

int main()
{
    if (true) {
        int i;
    }
    return 0;
}

And when I paste it:

    void foo()
    {
       int foo;
    }

int main()
{
        if (true) {
            int i;
        }
    return 0;
}

And this totally messes everything up, esspecially on code thats hundreds of lines and has many if statments, while loops etc.

Thanks


#2

Does this happen when you run atom --safe? Also you should mention the versions of atom and your OS.


#3

Sorry should’ve mentioned my OS and version.

I’m running 0.152.0 on Linux Mint 17.

Problem still occurs with atom --safe


#4

Auto-indention on paste was introduced around then. Try upgrading to the latest Atom version. You can also try turning the various indent and paste options on and off in settings.


#5

Thanks mark, turning off Auto indent on Paste worked.

Didn’t see that option, thanks mate.