# Override default object display length in REPL/env?

**URL:** <https://discourse.julialang.org/t/override-default-object-display-length-in-repl-env/69246>\
**Category:** General Usage\
**Tags:** repl, display\
**Created:** [October 5, 2021, 5:37pm UTC](https://discourse.julialang.org/t/override-default-object-display-length-in-repl-env/69246 "2021-10-05T17:37:38Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![lmiq](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lmiq/32/18314_2.png) [@lmiq](https://discourse.julialang.org/u/lmiq)\
**Post date:** [October 5, 2021, 6:30pm UTC](https://discourse.julialang.org/t/override-default-object-display-length-in-repl-env/69246/2 "2021-10-05T18:30:02Z")

</div>

No, apparently [there is no easy solution](https://discourse.julialang.org/t/more-less-head-tail-to-display-arrays-in-repl/47435). The workarounds are:

1. Use ` ;` to avoid printing at all if you don’t want to see the data.

2. If you actually know what you want to see, use slices:

```julia
julia> x = rand(300,300);

julia> x[1:3,1:3]
3×3 Matrix{Float64}:
 0.201148 0.343138 0.680792
 0.912477 0.670834 0.0462071
 0.497209 0.519856 0.501574

julia> x[1:2,:]
2×300 Matrix{Float64}:
 0.201148 0.343138 0.680792 0.250896 0.762277 … 0.947869 0.663313 0.331605 0.55514 0.69662
 0.912477 0.670834 0.0462071 0.866555 0.430131 0.705827 0.500807 0.28222 0.117387 0.232216

julia> x[end-2:end,:]
3×300 Matrix{Float64}:
 0.530914 0.288524 0.25518 0.719391 0.617756 … 0.754256 0.663696 0.624188 0.0637987 0.966756
 0.906517 0.724708 0.6759 0.756997 0.0216099 0.534473 0.709289 0.986315 0.733846 0.476186
 0.314051 0.712171 0.0621085 0.516785 0.563678 0.766445 0.79259 0.907545 0.46412 0.921298

```

1. Edit the data: I sometimes use this function:

```julia
function edit!(x)
    tmp_file_name = tempname()
    writedlm(tmp_file_name,x)
    InteractiveUtils.edit(tmp_file_name)
    x .= readdlm(tmp_file_name)
end

```

With that, you can actually view the data and even edit it on your default text editor, with:

```julia
julia> x = rand(2,2)
2×2 Matrix{Float64}:
 0.987879 0.215942
 0.974738 0.975242

julia> edit!(x) # open vim and changed the first value to zero
2×2 Matrix{Float64}:
 0.0 0.215942
 0.974738 0.975242

```

---

_[View the full topic](https://discourse.julialang.org/t/override-default-object-display-length-in-repl-env/69246)._
